Automated Invoice Processing with Telegram, GPT-4o, OCR and SAP Integration
VerifiedProcesses invoices from Telegram with AI and logs data to Google Sheets.
What this workflow does
This automation receives files via Telegram, applies an LLM chain for data parsing and structuring, and records results in Google Sheets.
It is designed for teams that need reliable AI-assisted capture of invoice details without manual entry.
Who is this for?
Finance teams and accountants in SMEs who receive supplier invoices via Telegram and need to log them in Google Sheets before pushing to SAP Business One.
What problem it solves
Manual invoice data entry from chat messages is slow and error-prone; teams waste hours transcribing PDFs and lack reliable structured output for ERP systems.
Live workflow preview
Interactive canvas of every node and connection — scroll and click to explore. Powered by n8n's preview.
Open the template on n8n to import and run it. View source template →
What it automates
Freelance supplier invoices
A consultant forwards PDF invoices received on Telegram; the workflow extracts totals and due dates then writes them to a shared Google Sheet for approval.
Monthly AP batch processing
Accounts payable receives 20+ invoices weekly via a Telegram group; data is parsed and appended to Sheets with a status column for SAP import review.
Remote team invoice capture
Field staff photograph paper invoices and send them on Telegram; the workflow converts them to structured rows ready for finance to push into SAP.
How the workflow works
The 7 nodes in this automation, in order.
- 1Google SheetsgoogleSheets
- 2HTTP RequesthttpRequest
- 3Telegramtelegram
- 4Codecode
- 5Basic LLM Chain@n8n/n8n-nodes-langchain.chainLlm
- 6OpenAI Chat Model@n8n/n8n-nodes-langchain.lmChatOpenAi
- 7Structured Output Parser@n8n/n8n-nodes-langchain.outputParserStructured
Apps & integrations used
How to set up Automated Invoice Processing with Telegram, GPT-4o, OCR and SAP Integration
- 1Add a Telegram Trigger node and configure it to watch for document messages.
- 2Use an HTTP Request node to download the file from Telegram's file API.
- 3Send the file to LlamaIndex OCR via HTTP Request and poll until status is SUCCESS.
- 4Pass the Markdown output into a Basic LLM Chain with OpenAI Chat Model and Structured Output Parser to extract invoice fields.
- 5Append the parsed data to a Google Sheets node, mapping columns for date, vendor, total and status.
- 6Add a conditional HTTP Request or SAP node to push approved rows to SAP Business One.
How to customize this workflow
- →Swap OpenAI Chat Model for another supported LLM inside the Basic LLM Chain node.
- →Change the Telegram Trigger to an Email Trigger or WhatsApp node.
- →Insert an approval step with Telegram Send Message before the SAP push.
- →Add error handling branches that notify a Slack channel on OCR failure.
Automated Invoice Processing with Telegram, GPT-4o, OCR and SAP Integration: pros & cons
Pros
- +Uses existing Telegram chats as the intake channel
- +Combines OCR and LLM for decent extraction accuracy
- +Direct Google Sheets logging gives immediate visibility
- +Structured Output Parser reduces post-processing
Cons
- –LlamaIndex OCR polling adds latency and extra HTTP calls
- –SAP integration requires additional custom HTTP setup not shown in core nodes
- –No built-in validation or human review before ERP write
Frequently asked questions
It receives invoice PDFs from Telegram, runs OCR, extracts structured fields with GPT-4o, logs them to Google Sheets and can forward to SAP.
User reviews
Verified reviews from the community shape this listing's rating.
Loading reviews…