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 user sends a PDF of an invoice through Telegram - A Telegram Trigger node listens for incoming messages and captures the file and metadata - The document is downloaded and prepared for OCR ๐น 2. OCR with LlamaIndex: - The fil
Automated invoice processing with Telegram, GPT-4o, OCR and SAP integration is a ready-made n8n workflow you import as a workflow JSON file โ no build required. It connects Google Sheets, OpenAI, Telegram. It's free to download. Follow the 5-step import below to go live in minutes.

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 user sends a PDF of an invoice through Telegram - A Telegram Trigger node listens for incoming messages and captures the file and metadata - The document is downloaded and prepared for OCR ๐น 2. OCR with LlamaIndex: - The file is uploaded to the LlamaIndex OCR API. - The workflow polls the API until the processing status returns SUCCESS - Once ready, the parsed content is fetched in Markdown format ๐น 3. Data Extraction via LLM (editable): - The Markdown content is sent to a language model (LLM) using LangChain - A Structured Output Parser transforms the result into a clean, structured editable JSON ๐น 4. Save to Google Sheets: The structured JSON is split into: 1. Header (main invoice metadata) 1. Detail (individual line items) Each part is stored in a dedicated tab within a connected Google Sheets file ๐น 5. Ask for SAP Confirmation: The bot replies to the user via Telegram: "Do you want to send the data to SAP?" If the user clicks "Yes", the next automation path is triggered. ๐น 6. Push Data to SAP B1: A connection is made to SAP Business One's Service Layer API Header and detail data are fetched from Google Sheets The invoice structure is rebuilt as required by SAP (DocumentLines, CardCode, etc.) A POST request creates the Purchase Invoice in SAP A confirmation message with the created DocEntry is sent back to the user on Telegram ++SET UP STEPS:++ Follow these steps to properly configure the workflow before execution: 1๏ธโฃ Create Required Credentials: Go to Credentials > + New Credential and create the following: - Telegram API (set your bot token get it from BotFather) - Google Sheets - OpenAI 2๏ธโฃ Set Up Environment Variables (Optional but Recommended): LLAMAINDEXAPIKEY SAPUSER SAPPASSWORD SAPCOMPANYDB SAPURL 3๏ธโฃ Prepare Google Sheets: Ensure your Google Spreadsheet has the following: โค Sheet 1: Header โค Sheet 2: Details Contains columns for invoice lines
Download the workflow JSON file after purchase.
Open n8n โ click the menu โ Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
Discover business leads with Gemini, Brave Search and web scraping
Analyze Landing Page with OpenAI and Get Optimization Tips
Prevent duplicate webhook executions with AARI idempotency gate
Generate trend-based marketing videos with Seedance AI, Perplexity, and GPT
Automatically update n8n version
Notify on Discord about new Epic Games free game releases
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.