Skip to main content

Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini

Workflow preview

Workflow preview
100%
Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini preview
Open on n8n.io

1. Workflow Overview

Log receipt transactions from Telegram images to Excel using OCR and AI OCR + AI + Duplicate Protection (n8n Workflow) Overview This workflow automatically converts receipt images or payment p...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.stickynote, n8n-nodes-base.microsoftexcel, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-tesseractjs.tesseractnode, n8n-nodes-base.telegram, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Ramdoni.

Original n8n.io source

1.1 Workflow description

Title
Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini
Workflow name
Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini

📸💰 Log receipt transactions from Telegram images to Excel using OCR and AI

OCR + AI + Duplicate Protection (n8n Workflow)

Overview

This workflow automatically converts receipt images or payment proof sent via Telegram into structured financial records stored in Excel 365.

Core flow:

Take Photo → OCR → AI Structuring → Validation → Duplicate Check → Append to Excel

The system is designed to reduce manual data entry errors and improve financial visibility by turning unstructured receipt images into reliable financial records.

How it works

This workflow captures receipt images sent to a Telegram bot and converts them into structured financial records in Excel.

When a user sends an image, the workflow downloads the file and extracts the text using OCR. The extracted text is then analyzed by an AI model (OpenAI or Gemini) to identify key transaction details such as date, amount, merchant, and transaction type.

The workflow validates the extracted data and generates a unique duplicate key. It then checks Excel to ensure the transaction has not already been recorded. If no duplicate is found, the transaction is appended to the Excel sheet.

The user receives a confirmation message in Telegram indicating whether the transaction was successfully recorded or rejected due to missing data or duplication.

Workflow Nodes

The workflow contains the following nodes:

  1. Telegram Trigger
  2. Edit Fields (extract chat_id and image_id)
  3. Condition (validate image exists)
  4. Telegram Get File
  5. Tesseract OCR
  6. AI Agent (ChatGPT / Gemini)
  7. Edit Field (JSON Output Parsing)
  8. Excel 365 – Get Configuration
  9. Edit Field – Normalize & Generate duplicate_key
  10. Condition – Validate required fields
  11. Excel 365 – Lookup duplicate_key
  12. Condition – Duplicate Check
  13. Excel 365 – Append Transaction
  14. Telegram – Send Confirmation Message

🧠 What This Workflow Does

This workflow automatically:

  • Captures receipt images from Telegram
  • Extracts text using OCR
  • Converts OCR text into structured transaction data using AI
  • Validates required financial fields
  • Prevents duplicate transaction entries
  • Saves valid records into Excel
  • Sends confirmation messages to Telegram

Setup steps

  1. Create a Telegram bot using @BotFather and copy the Bot Token.
  2. Add Telegram credentials in n8n using the Bot Token.
  3. Prepare an Excel file in OneDrive or SharePoint with a TRANSACTIONS sheet.
  4. Configure Microsoft Excel credentials in n8n.
  5. Add either OpenAI or Google Gemini credentials for the AI parsing step.
  6. If running self-hosted n8n, ensure Tesseract OCR is installed.
  7. Activate the workflow and send a receipt image to the Telegram bot to test.

🎯 Key Benefits

• Reduce financial recording errors • Eliminate repetitive manual data entry • Improve cashflow visibility • Simple photo-based financial recording • Scalable foundation for AI-powered financial automation

🚀 Use Cases

This workflow is useful for: • Small business owners • Online sellers • Freelancers • Finance administrators • Personal expense tracking

📌 Notes

• Duplicate detection is based on a composite transaction key • OCR accuracy depends on image quality • AI parsing improves recognition compared to OCR-only approaches

🧱 Requirements

To run this workflow you need: • n8n (Cloud or Self-Hosted) • Telegram Bot Token • Microsoft Excel 365 Account • OpenAI API Key or Google Gemini API Key • Tesseract OCR (for self-hosted installations)

🏁 Result

After setup, users can simply send receipt photos to Telegram and the workflow will automatically convert them into structured financial records stored in Excel.

No manual bookkeeping required.

Built for automation lovers, small businesses, and teams who want simple but powerful financial tracking using n8n.```language


1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 2 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Get Configurations

Type / Role
n8n-nodes-base.microsoftExcel - microsoftExcel
Config choices
Version 2.2

Block 5 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 6 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Tesseract OCR

Type / Role
n8n-nodes-tesseractjs.tesseractNode - tesseractNode
Config choices
Version 1

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Send Notification

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 12 - Send Notification image not valid

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Send notification duplicate

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 14 - Telegram get file

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 15 - JSON output parsing

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Send confirmation message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 17 - Parse receipt data with AI

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 18 - Extract Telegram chat and file ID

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Check if image was uploaded

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 20 - Validate required transaction fields

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 21 - Check for duplicate transaction

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - Normalize transaction data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 23 - Check existing transaction in Excel

Type / Role
n8n-nodes-base.microsoftExcel - microsoftExcel
Config choices
Version 2.2

Block 24 - Save transaction to Excel

Type / Role
n8n-nodes-base.microsoftExcel - microsoftExcel
Config choices
Version 2.2

Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini
Complexity advanced
Nodes 27
Categories Invoice Processing, AI Summarization
Author Ramdoni
Published 05 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13897/13897.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Log Telegram receipt images to Excel 365 using Tesseract OCR and GPT-4.1-mini do?

Log receipt transactions from Telegram images to Excel using OCR and AI OCR + AI + Duplicate Protection (n8n Workflow) Overview This workflow automatically converts receipt images or payment p...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.