AutomationMart
Home/Browse/Automated invoice processing with Telegram, GPT-4o, OCR and SAP integration
n8n

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

n8nn8n27 modulesv1.0
Google SheetsOpenAITelegram

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

At a glance

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.

Platform
n8n
Connects
Google Sheets, OpenAI, Telegram
Modules
27
Price
Free
Version
v1.0
Automated invoice processing with Telegram, GPT-4o, OCR and SAP integration workflow diagram

About this workflow

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

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Add Textline customers to a Google Sheets spreadsheet

Every time a new customer created in Textline, Make will automatically add that customer to a new row in a Google Sheets spreadsheet. The template uses this [example spreadsheet](https://docs.google.com/spreadsheets/d/1Ojk6APW7KVur0KTjPV5GXlcY7UEH4KyBdwgdhYO3Ebc/edit?usp=sharing).

Free

Send a Gmail email from a new Google Sheets row

Effortlessly send Gmail messages when a new row is added to your Google Sheets. Just ensure your spreadsheet includes these columns: - Email Address - Subject - Content

Free

Create WordPress posts from new Google Sheets rows using ChatGPT completions

This automation creates WordPress posts from new Google Sheets rows using ChatGPT. Streamline content creation by integrating Google Sheets, OpenAI, and WordPress.

Free

Aggregate Google Sheets data to JSON and send via HTTP action

Automatically convert Google Sheets data to JSON and send it via HTTP. Streamline data processing with Google Sheets, JSON, and HTTP integration.

Free

Sending messages from Slack to GREEN-API for WhatsApp

Full article: https://green-api.com/en/docs/integration/make/slack/ In this template, we'll exchange messages between private channel in Slack and WhatsApp. You'll need GREEN-API instance https://green-api.com/ and OpenAI API key and Slack account https://slack.com/.

Free

Automated email triage with Gmail, GPT-4o, and Slack urgency notifications

Hourly Email Summary: This agent scans your inbox every 4 hour and summarizes new emails into a clean, actionable Slack message. Powered by GPT-4, it classifies emails by Urgency (High, Medium, Low) and Intent (Awaiting Reply, To Respond, Comment, Notification, Marketing). No more inbox FOMO — just what you need to act fast. Main Use Cases: • Stay on top of important threads without refreshing your inbox constantly • Prioritize tasks and replies based on urgency and context • Catch missed follo

Free

Analyze competitor Instagram engagement with Bright Data and GPT-5.5

Analyze competitor Instagram engagement by scraping profiles with Bright Data and scoring them with GPT-5.5. This workflow reads competitor Instagram URLs from a Google Sheet, scrapes their profile data using the Bright Data Instagram Profiles dataset, validates the API response, then sends the data to GPT-5.5 for engagement scoring. Each competitor is scored on follower growth, engagement rate quality, content consistency, and audience authenticity (0-25 each, total 0-100). High-scoring competi

Free

Create animated baby podcast videos with GPT, DALL-E, ElevenLabs and Hedra

Overview This workflow is your personal content creation studio for social media. It takes a simple idea and a few descriptive words and automatically produces a complete, ready-to-share video of a custom-designed baby hosting their own podcast. It's the ultimate tool for creating unique, funny, and engaging content that captures attention and drives shares. 😩 The Problem Creating animated video content is a massive headache. Manually, you'd have to: 1. Hire or be a skilled graphic designer to c

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free