Extract and log Gmail receipt expenses with OpenAI, Sheets and Airtable
Ready for 3.0What this workflow does
This AI workflow has 39 nodes and runs on Gmail events. Along the way it connects Gmail, Airtable, Google Sheets and OpenAI and 1 more.
How it runs
Trigger: On Gmail events.
- Configure Receipt Settings (Code): runs custom JavaScript code
- Normalize Email Structure (Code): runs custom JavaScript code
- Check Airtable Log Usage (If): checks a condition and branches into true / false
- Fetch Airtable Expenses (Airtable): search
- Bypass Airtable Data Collection (Code): runs custom JavaScript code
- Compile Airtable Data (Code): runs custom JavaScript code
- Check Sheets Log Usage (If): checks a condition and branches into true / false
- Fetch Sheets Expenses (Google Sheets): read (sheet)
- Transfer Lookup Data (Code): runs custom JavaScript code
- Combine Sheets Data (Code): runs custom JavaScript code
…plus 28 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When Receipt Arrives in Gmail).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Airtable
n8n-nodes-base.airtable - Google Sheets
n8n-nodes-base.googleSheets - OpenAI
@n8n/n8n-nodes-langchain.openAi - Slack
n8n-nodes-base.slack - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow monitors a Gmail “Receipts” label, downloads attachments, uses OpenAI to extract expense data from receipt emails and images, skips duplicates and non-receipts, fails safely when extraction is unreadable, sends Slack/Teams alerts…