Track email expenses from Gmail with OpenAI, Google Sheets, and Slack alerts
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI, Google Sheets and Slack.
How it runs
Trigger: On Gmail events.
- Filter Invoice/Receipt Emails (If): checks a condition and branches into true / false
- Extract Email Data (Edit Fields (Set)): sets or maps fields
- Merge: merges the data from its input branches
- Validate Email Content (If): checks a condition and branches into true / false
- Format Expense Data (Edit Fields (Set)): sets or maps fields
- AI Expense Extractor (OpenAI): uses OpenAI
- Lookup Expense (Google Sheets) (Google Sheets): uses Google Sheets
- Parse AI Output (Edit Fields (Set)): sets or maps fields
- Filter Duplicate Records (If): checks a condition and branches into true / false
- Save to Expense Sheet (Google Sheets): append
…plus 2 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) (Email Listener (Gmail Trigger)).
Nodes used (7)
- Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Gmail Trigger
n8n-nodes-base.gmailTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi - Merge
n8n-nodes-base.merge - Google Sheets
n8n-nodes-base.googleSheets - Slack
n8n-nodes-base.slack
From the author
Quick Overview This workflow monitors Gmail for invoice or receipt emails, uses OpenAI to extract an expense amount and category, logs the result to Google Sheets, and sends a Slack alert when an expense exceeds a defined threshold. How it works 1. Triggers…