Extract expenses from emails and add to Google Sheet

Extract expenses from emails and automatically add them to Google Sheets. This workflow reads emails for receipts, extracts key details like date, description, category, currency, and amount, and organizes them in a structured format, saving time and reducing manual entry errors.

7/8/2025
6 nodes
Medium
emailmediumemailreadimapmindeegooglesheetslogicconditionalnotification
Categories:
Data Processing & AnalysisMedium WorkflowEmail TriggeredAI Agent Development
Integrations:
EmailReadImapMindeeGoogleSheets

Target Audience

This workflow is ideal for:
- Small Business Owners: To efficiently manage and track expenses from receipts received via email.
- Freelancers: To automate expense tracking, saving time on manual entry.
- Accountants: To streamline the process of collecting and organizing financial data from clients.
- Individuals: Who want to maintain a personal budget by keeping track of their spending without manual effort.

Problem Solved

This workflow addresses the challenge of manually tracking and organizing expenses from email receipts. It automates the extraction of important data like dates, amounts, and categories from emails, ensuring that users can easily maintain accurate financial records without tedious manual entry.

Workflow Steps

  • Check for New Emails: The workflow starts by checking the user's email inbox for any new emails.
    2. Setup Variables: It sets up necessary variables, including a regex pattern to identify relevant emails containing keywords like expenses or receipt.
    3. Check Subject: The workflow checks the subject of each email against the defined patterns to determine if it contains receipts.
    4. Read Receipts: If a matching email is found, it uses Mindee to extract data from the receipt attachment, capturing essential details such as date, amount, currency, and category.
    5. Set Column Data: The extracted data is organized into a structured format, preparing it for entry into a Google Sheet.
    6. Add to Google Sheet: Finally, the structured data is appended to a specified Google Sheet, allowing for easy tracking and analysis of expenses.
  • Customization Guide

    Users can customize this workflow by:
    - Modifying the Regex Pattern: Adjust the subjectPatterns variable to include additional keywords relevant to their specific needs.
    - Changing the Google Sheet: Update the sheetId parameter to point to a different Google Sheet where expenses should be recorded.
    - Adjusting Data Extraction: Modify the parameters in the Mindee node to extract different fields based on the format of receipts being used.
    - Adding Additional Processing Steps: Include extra nodes to perform further actions, such as sending notifications or generating reports based on the collected data.