Templates / Process email invoices with OCR, GPT-4, Slack, QuickBooks and Google Sheets

Process email invoices with OCR, GPT-4, Slack, QuickBooks and Google Sheets

Ready for 3.0

by ResilNext ✓ · 2,005 views · created 2026-03-23 · Invoice Processing, AI Summarization

Ready 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.

What this workflow does

This AI workflow has 20 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Slack and QuickBooks Online and 1 more.

How it runs

Trigger: On Gmail events.

  1. Workflow Configuration (Edit Fields (Set)): sets 5 fields: ocrApiUrl, validationTolerance, confidenceThreshold…
  2. Capture Invoice Metadata (Edit Fields (Set)): sets 4 fields: invoiceSource, receivedTimestamp, fileHash…
  3. Check File Type (If): checks a condition and branches into true / false
  4. Extract Text from PDF (Extract from File): extracts data from a file (pdf)
  5. OCR for Images (HTTP Request): calls an HTTP API (POST)
  6. Merge: merges the data from its input branches
  7. AI Invoice Extractor (AI Agent): runs an AI agent, with model: OpenAI GPT-; output parser: Invoice Schema Parser
  8. Validate and Recalculate Totals (Code): runs custom JavaScript code
  9. Mask PII Data (Code): runs custom JavaScript code
  10. Check if Review Needed (If): checks a condition and branches into true / false

…plus 6 more steps. See the full node list below.

Services it uses

GmailOpenAI Chat ModelSlackQuickBooks OnlineGoogle Sheets

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) (Invoice Email Trigger).

Nodes used (14)

From the author

Overview This workflow automates invoice processing directly from your email inbox. It captures invoice attachments, extracts structured data using OCR and AI, validates totals, and securely processes invoices. If issues are detected, it routes them for human…

Excerpt from ResilNext's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.