Templates / Invoice processor & validator with OCR, AI & Google Sheets

Invoice processor & validator with OCR, AI & Google Sheets

Needs changes

by Dhrumil Patel ✓ · 34,704 views · created 2025-05-20 · 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 14 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenRouter Chat Model and Google Sheets.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Read/Write Files from Disk: reads a file from disk
  2. Extract from File: extracts data from a file (pdf)
  3. Text Extractor (AI Agent): runs an AI agent, with model: OpenRouter Chat Model
  4. Post-Processing (Code): runs custom JavaScript code
  5. If: checks a condition and branches into true / false
  6. Send Raw Text Again (Edit Fields (Set)): sets 1 field: text
  7. Split Out: splits a list into separate items
  8. Generate Unique Key (Edit Fields (Set)): sets 1 field: Unique Key
  9. Send Invoice Data (Google Sheets): append
  10. Fetch Master Data (Google Sheets): uses Google Sheets

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

Services it uses

OpenRouter Chat ModelGoogle Sheets

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 Text Extractor (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Text Extractor (v1.8)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (10)

From the author

📝 Say goodbye to manual invoice checking! This smart workflow automates your entire invoice processing pipeline using AI, OCR, and Google Sheets. --- ⚙️ What This Workflow Does: 📥 1. Reads an invoice PDF — Select a local PDF invoice from your machine. 🔍 2.…

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