Track and log receipt expenses in Google Sheets with Gmail, Drive, and Claude
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, Google Drive, Anthropic Chat Model and Google Sheets.
How it runs
Trigger: On Gmail events (plus 1 other trigger).
- Normalize Email (Code): runs custom JavaScript code
- Download Receipt File (Google Drive): download
- Has Attachment? (If): checks a condition and branches into true / false
- Normalize Upload (Code): runs custom JavaScript code
- Archive Receipt File (Google Drive): uses Google Drive
- Route by Type (Switch): routes items into 3 branches
- Use File Link (Edit Fields (Set)): sets 7 fields: source, kind, subject…
- Extract PDF Text (Extract from File): extracts data from a file (pdf)
- Extract Receipt (Vision) (Basic LLM Chain): sends a prompt to an LLM, with model: Claude (Vision); output parser: Receipt Fields Parser
- Extract Receipt Data (Information Extractor): extracts structured fields from text with AI, with model: Claude (Text)
…plus 2 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (13)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Drive
n8n-nodes-base.googleDrive - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Extract from File
n8n-nodes-base.extractFromFile - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick Overview This workflow monitors Gmail and a Google Drive folder for receipts, uses Anthropic Claude to extract expense details from email bodies, PDFs, and images, archives attachments to Google Drive, and appends validated expenses to a Google Sheets…