Gmail Receipts AI Expense Tracker
Watch Gmail for receipt emails, extract merchant, total, category, tax hints, warranty dates, and line items with OpenAI, use AI OCR for image-only receipt attachments when needed, skip duplicates, alert your team for high-value or review-needed purchases, and log everything to Google Sheets and/or Airtable.
Listed on the n8n marketplace as “Extract and log Gmail receipt expenses with OpenAI, Sheets and Airtable”.
Who it's for
Founders, freelancers, small teams, and households that want receipts organized without manual spreadsheet entry. Built for people who need a searchable purchase history for taxes, reimbursements, warranties, returns, and spending questions.
What it does
This workflow watches Gmail for receipt-like emails, downloads receipt attachments, normalizes the message text, checks Sheets and/or Airtable for duplicates, uses OpenAI to extract structured expense fields from email text, falls back to OpenAI image OCR when body text is thin and a receipt image is attached, skips non-receipt emails and failed extractions cleanly, routes review/high-value/warranty receipts to Slack and/or Microsoft Teams, and logs every valid receipt into a clean expense memory.
Defaults (same as Gumroad listing)
EXPENSE_LOG = sheets(options:sheets|airtable|both)NOTIFY_CHANNELS = slack(options:slack|teams|both|none)- High-value threshold: 250
- Duplicate window: 45 days
- Warranty alerts: true
- Attachment OCR fallback: true
High-value, warranty-relevant, or low-confidence receipts trigger chat alerts. Standard receipts are logged without notification noise.
How it works
- When Receipt Arrives in Gmail watches receipt-like messages or a Receipts label and downloads attachments
- Configure Receipt Settings sets log destination, notification channels, IDs, and thresholds
- Normalize Email Structure extracts sender, subject, body text, message ID, receipt hash, and attachment metadata
- Sheets and/or Airtable lookup loads recent records for duplicate detection
- Check Receipt Duplication skips already-logged receipts
- AI Receipt Data Extraction extracts merchant, total, category, tax hints, line items, warranties, and confidence from email text
- AI Receipt Attachment OCR handles image-only receipt attachments when the body text is too thin
- Analyze Receipt Extraction decides standard / high-value / warranty / review routing, or returns non-receipt/extraction-failed skips
- Format Receipt Alert posts to Slack and/or Teams based on
NOTIFY_CHANNELS - Create Expense Log writes valid structured receipts to Sheets and/or Airtable based on
EXPENSE_LOG
Setup steps
- Import the workflow JSON into n8n
- Add a Gmail label such as Receipts and connect Gmail OAuth2
- Choose log destination: Google Sheets, Airtable, or both (
EXPENSE_LOG) - Create the Sheets Expenses tab and/or Airtable Expenses table using the sample field files
- Choose notification destination: Slack, Teams, both, or none (
NOTIFY_CHANNELS) - Edit Configure Receipt Settings with your IDs, channels, and thresholds
- Connect credentials only for destinations you enabled (Gmail, OpenAI, Google Sheets, Airtable, Slack)
- Label one test receipt, verify extraction/logging/alerts, then activate
Requirements (optional form fields - add one line each)
n8n Cloud or self-hosted n8n instance Gmail account with receipt emails or a Receipts label OpenAI API key configured in n8n Google Sheets OAuth2 and/or Airtable Personal Access Token (based on EXPENSE_LOG) Slack OAuth2 and/or Microsoft Teams incoming webhook (based on NOTIFY_CHANNELS)
Customization (optional form fields - add one line each)
Set EXPENSE_LOG to sheets, airtable, or both Set NOTIFY_CHANNELS to slack, teams, both, or none Change HIGH_VALUE_THRESHOLD and DUPLICATE_WINDOW_DAYS in Configure Receipt Settings Tune the AI prompt in AI Receipt Data Extraction for your preferred categories Tune ATTACHMENT_OCR_ENABLED and OCR_MIN_TEXT_CHARS for image-only receipts Add Gmail filters for your common receipt senders Extend PDF handling by converting PDF pages to images or using OpenAI file input
Additional info (optional - paste as one block)
This template targets the recurring pain of receipts disappearing across email inboxes. It sells the outcome as a searchable expense memory, not just a receipt database. Defaults match the Gumroad product listing (Google Sheets + Slack) so docs stay consistent across both portals.
Ideas to extend
- Add weekly tax-deductible receipt summaries
- Add warranty and return-deadline reminders
- Split business vs personal receipts by sender, category, or card last four
- Connect the expense memory to a Telegram, Slack, or MCP-based receipt search bot
Stuck connecting credentials? Our Credential Setup Coach walks you through 60+ provider connections step by step.