Extract invoice data with Google Gemini, Google Sheets, and Telegram
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs when someone submits an n8n form (“AI OCR Invoice Upload”) (plus 1 other trigger). Along the way it connects Google Sheets, Google Gemini and Telegram.
How it runs
Trigger: When someone submits an n8n form (“AI OCR Invoice Upload”) (plus 1 other trigger).
- Prepare Invoice Input (Code): runs custom JavaScript code
- File Is Processable? (If): checks a condition and branches into true / false
- Upload a media file (Google Gemini): work with file
- Build Invalid File Result (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Send Telegram Rejection (Telegram): uses Telegram
- Analyze document (Google Gemini): work with document
- Analyze an image (Google Gemini): analyze (image)
- Normalize and Validate (Code): runs custom JavaScript code
- Split Out: splits a list into separate items
…plus 3 more steps. See the full node list below.
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 (8)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Split Out
n8n-nodes-base.splitOut - Telegram Trigger
n8n-nodes-base.telegramTrigger - Telegram
n8n-nodes-base.telegram
From the author
Quick overview This workflow accepts invoice PDFs or images from an n8n Form or Telegram, uses Google Gemini to OCR and extract structured invoice fields and line items, appends the results to Google Sheets, and sends a success or rejection notification via…