Track and log receipt expenses in Google Sheets with Gmail, Drive, and Claude
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
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
What it does
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 log with a link to the original receipt. How it works 1. Triggers every minute when new Gmail messages matching the query label:receipts arrive and downloads any attachments. 2. Normalizes the email content, and if an attachment exists, uploads it to Google Drive to generate a permanent Drive link. 3. Triggers every minute when a new file is created in a specified Google Drive folder, downloads the file, and normalizes it as a receipt input. 4. Routes each item as PDF, image, or email-body text, extracting PDF text when needed. 5. Uses Anthropic Claude (text or vision) to extract structured receipt fields (vendor, date, total, currency, category, and payment method) and flags whether the content is a real receipt. 6. Filters out non-receipts and appends the remaining expenses to Google Sheets, including the receipt link and a timestamp. Setup 1. Connect credentials for Gmail, Google Drive, and Google Sheets, and select the target Google Sheets document and sheet for logging. 2. Add an Anthropic credential and select the Claude model for both the text and vision extraction steps. 3. In Gmail, create and apply a “receipts” label (or update the Gmail query) so receipt emails are captured. 4. In Google Drive, choose a folder to watch for uploaded receipt photos/PDFs and a folder to store archived email attachments. 5. Create the Google Sheet columns used by the workflow (Date, Vendor, Total, Currency, Category, Payment Method, Source, Receipt Link, Logged At).