Templates / Financial document extraction from Gmail to Google Sheets

Financial document extraction from Gmail to Google Sheets

Needs changes

by Gtaras ✓ · 4,975 views · created 2025-11-27 · Invoice Processing, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) 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, Guardrails, Google Sheets and OpenAI Chat Model and 1 more.

How it runs

Trigger: On Gmail events.

  1. Get Email Content (Gmail): get many
  2. Guardrail: Is Finance? (Guardrails): uses Guardrails, with model: Gemini 2.5 flash
  3. Configuration: User Settings (Edit Fields (Set)): sets or maps fields
  4. If: checks a condition and branches into true / false
  5. Filter: keeps only the items that match a condition
  6. Check for Attachment (If): checks a condition and branches into true / false
  7. Extract PDF Data (Extract from File): extracts data from a file (pdf)
  8. AI Agent: runs an AI agent, with model: gpt 4o mini
  9. AI Agent: runs an AI agent, with model: gpt 4o mini
  10. Validate Extraction (Code): runs custom JavaScript code

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

Services it uses

GmailGuardrailsGoogle SheetsOpenAI Chat ModelGoogle Gemini Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Agent (PDF OCR) (v1.9), AI Agent (Email OCR) (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Agent (PDF OCR) (v1.9), AI Agent (Email OCR) (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (12)

From the author

Overview Manual financial reconciliation is tedious and prone to error. This workflow functions as an AI Financial Controller, automatically monitoring your inbox for invoices, receipts, and bills, extracting the data using OCR, and syncing it to Google…

Excerpt from Gtaras'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.