Skip to main content

AI auto-save Gmail receipts to Google Sheets + Google Drive

Workflow preview

Workflow preview
100%
AI auto-save Gmail receipts to Google Sheets + Google Drive preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for? This workflow is ideal for: For freelancers, business owners, and finance teams who receive receipts via Gmail Automatically logs expenses for tax, bookkeeping and year end audits ...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.gmail, n8n-nodes-base.set, n8n-nodes-base.googlesheets, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Matt Chong | n8n Creator.

Original n8n.io source

1.1 Workflow description

Title
AI auto-save Gmail receipts to Google Sheets + Google Drive
Workflow name
AI auto-save Gmail receipts to Google Sheets + Google Drive

Who is this for?

This workflow is ideal for:

  • For freelancers, business owners, and finance teams who receive receipts via Gmail
  • Automatically logs expenses for tax,
  • bookkeeping and year-end audits

What problem is this workflow solving?

When tax season hits, missing receipts create panic.

This workflow keeps everything in one place. It uses AI to extract details from Gmail attachments, logs them in a Google Sheet, and stores the PDFs in Google Drive.

No digging. No copying. Just everything where it should be.

How it works?

  1. Apply the label receipt to any incoming Gmail email. Do not mark it as read.

  2. On a schedule (e.g. daily at 8:00 AM), the workflow triggers.

  3. It searches for unread emails with the label receipt.

  4. For each matching email, it downloads the attached receipt file.

  5. It extracts text content from the receipt file.

  6. It uploads the original receipt file to a specified folder in Google Drive.

  7. It merges the extracted text with email metadata.

  8. It sends this combined data to OpenAI.
    OpenAI extracts structured fields:

    • date
    • merchant
    • category
    • description
    • subtotal
    • tax
    • total
  9. The extracted data is appended as a new row in the specific Google Sheet.

  10. Finally, the email is marked as read to prevent it from being processed again.

How to set up?

  1. Connect these services in your n8n credentials:
    • Gmail (OAuth2)
    • Google Drive
    • Google Sheets
    • OpenAI
  2. Configure the Google Drive upload:
    • In the “Upload File” node, select the target folder where you want receipt PDFs stored.
  3. Set your execution schedule:
    • Open the “Schedule Trigger” node and choose when it should run (default is once daily at 8:00 AM).
  4. Choose your Google Sheet and tab:
    • In the “Append to Google Sheet” node, select your document and tab
    • Ensure the sheet contains these columns:
      Date, Merchant, Category, Description, Subtotal, Tax, Total.

How to customize this workflow to your needs?

  • Change the Gmail label or search filter to match your needs.
  • Modify the OpenAI schema to extract additional fields like currency, project, or notes.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 5 - Get Emails with Receipts

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 6 - Get Required Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Download Attachment

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 8 - Append to Google Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 9 - Merge Data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 10 - Upload File

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 11 - Extract Data from Invoice

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 12 - Mark Email as Read

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow AI auto-save Gmail receipts to Google Sheets + Google Drive
Complexity intermediate
Nodes 14
Categories Invoice Processing, AI Summarization
Author Matt Chong | n8n Creator
Published 29 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5451/5451.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI auto-save Gmail receipts to Google Sheets + Google Drive do?

Who is this for? This workflow is ideal for: For freelancers, business owners, and finance teams who receive receipts via Gmail Automatically logs expenses for tax, bookkeeping and year end audits ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.