Invoice processor & validator with OCR, AI & Google Sheets
Needs changesWhat 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”.
- Read/Write Files from Disk: reads a file from disk
- Extract from File: extracts data from a file (pdf)
- Text Extractor (AI Agent): runs an AI agent, with model: OpenRouter Chat Model
- Post-Processing (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Send Raw Text Again (Edit Fields (Set)): sets 1 field: text
- Split Out: splits a list into separate items
- Generate Unique Key (Edit Fields (Set)): sets 1 field: Unique Key
- Send Invoice Data (Google Sheets): append
- Fetch Master Data (Google Sheets): uses Google Sheets
…plus 2 more steps. See the full node list below.
Services it uses
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.0 | Replace 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)
- Manual Trigger
n8n-nodes-base.manualTrigger - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Split Out
n8n-nodes-base.splitOut - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Read/Write Files from Disk
n8n-nodes-base.readWriteFile - Extract from File
n8n-nodes-base.extractFromFile - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets
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.…