Extract & structure invoice data with Google Vision OCR, Gemini LLM & Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs when someone submits an n8n form (“Upload Purchase Invoice”). Along the way it connects OpenRouter Chat Model, Google Drive, Telegram and Google Sheets.
How it runs
Trigger: When someone submits an n8n form (“Upload Purchase Invoice”).
- Upload file (Google Drive): uses Google Drive
- Download file (Google Drive): download
- Code: runs custom JavaScript code
- Set Vision API (Edit Fields (Set)): sets 1 field: visionAPI
- HTTP Request: calls an HTTP API (POST)
- Basic LLM Chain: sends a prompt to an LLM, with model: OpenRouter Chat Model; output parser: Structured Output Parser
- Code: runs custom JavaScript code
- Append or update row in sheet (Google Sheets): append or update
- Send a text message (Telegram): uses Telegram
Services it uses
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.
Nodes used (10)
- Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Drive
n8n-nodes-base.googleDrive - HTTP Request
n8n-nodes-base.httpRequest - Telegram
n8n-nodes-base.telegram - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - n8n Form Trigger
n8n-nodes-base.formTrigger
From the author
Automated Invoice Collection & Data Extraction Using Vision API and LLM This workflow automates the process of collecting uploaded invoices, extracting text using Google Vision API, and processing the extracted text with an LLM to produce structured data…