Templates / Automated invoice processing with Telegram, GPT-4o, OCR and SAP integration

Automated invoice processing with Telegram, GPT-4o, OCR and SAP integration

Ready for 3.0

by Raquel Giugliano ✓ · 30,812 views · created 2025-06-10 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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).

  1. Capture Telegram Data (Edit Fields (Set)): sets 4 fields: message.chat.id, message.chat, telegram.file_id…
  2. Answer? (Switch): routes items into 2 branches
  3. File Received (Telegram): uses Telegram
  4. Connect to SAP (HTTP Request): calls an HTTP API (POST)
  5. Download File (Telegram): work with file
  6. Get Header (Google Sheets): uses Google Sheets
  7. Upload File LlamaIndex (HTTP Request): calls api.cloud.llamaindex.ai (POST)
  8. Get Row Details (Google Sheets): uses Google Sheets
  9. Merge: merges the data from its input branches
  10. Validate Status LlamaIndex (HTTP Request): calls an HTTP API

…plus 12 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelTelegramGoogle Sheets

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)

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…

Excerpt from Raquel Giugliano's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.