Automated invoice processing with Telegram, GPT-4o, OCR and SAP integration
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs on Telegram events (message) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Telegram and Google Sheets. It also calls api.cloud.llamaindex.ai over HTTP.
How it runs
Trigger: On Telegram events (message) (plus 1 other trigger).
- Capture Telegram Data (Edit Fields (Set)): sets 4 fields: message.chat.id, message.chat, telegram.file_id…
- Answer? (Switch): routes items into 2 branches
- File Received (Telegram): uses Telegram
- Connect to SAP (HTTP Request): calls an HTTP API (POST)
- Download File (Telegram): work with file
- Get Header (Google Sheets): uses Google Sheets
- Upload File LlamaIndex (HTTP Request): calls api.cloud.llamaindex.ai (POST)
- Get Row Details (Google Sheets): uses Google Sheets
- Merge: merges the data from its input branches
- Validate Status LlamaIndex (HTTP Request): calls an HTTP API
…plus 12 more steps. See the full node list below.
Services it uses
HTTP calls to: api.cloud.llamaindex.ai
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 (14)
- Wait
n8n-nodes-base.wait - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - No Operation, do nothing
n8n-nodes-base.noOp - Split Out
n8n-nodes-base.splitOut - Merge
n8n-nodes-base.merge - Telegram Trigger
n8n-nodes-base.telegramTrigger - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Telegram
n8n-nodes-base.telegram - Edit Fields (Set)
n8n-nodes-base.set - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
++HOW IT WORKS:++ This workflow automates the processing of invoices sent via Telegram. It extracts the data using LlamaIndex OCR, logs it in Google Sheets, and optionally pushes the structured data to SAP Business One 🔹 1. Receive Invoice via Telegram: - A…