AutomationFlowsAI & RAG › Log Telegram Receipt Images to Excel 365 Using Tesseract OCR and Gpt-4.1-mini

Log Telegram Receipt Images to Excel 365 Using Tesseract OCR and Gpt-4.1-mini

ByRamdoni @ramdoni on n8n.io

OCR + AI + Duplicate Protection (n8n Workflow)

Event trigger★★★★☆ complexityAI-powered27 nodesTelegram TriggerMicrosoft ExcelOpenAI ChatN8N Nodes TesseractjsTelegramAgent
AI & RAG Trigger: Event Nodes: 27 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13897 — we link there as the canonical source.

This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "61JuaEH4hd2v0Uck",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Log receipt transactions from Telegram images to Excel using OCR and AI",
  "tags": [],
  "nodes": [
    {
      "id": "819bc3ef-5fd4-49b5-9d9b-79c64ce99257",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -560,
        -208
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "afb73b10-60bf-4ba3-96cb-f0891f6ac5a7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "46c06288-e7a5-415e-a468-00eb254ffb87",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "25e7ac1a-0def-4a36-80ed-ebce8568e05b",
      "name": "Get Configurations",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        1168,
        128
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "c1e967bf-9e1b-435f-bafd-80a273e4125c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        624,
        144
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "26f32c5e-b7bd-4938-928b-522480d83b8d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -144
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ff0a7696-9d59-4fea-8170-c579dbf7f9f0",
      "name": "Tesseract OCR",
      "type": "n8n-nodes-tesseractjs.tesseractNode",
      "position": [
        448,
        -48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cc65e743-24a7-4020-953c-acc949d1170a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -848
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f73bb7a8-7d3a-4334-8bda-b7e15d90cd40",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -848
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f208e594-4afd-4dfd-a5ce-4c34a7891b34",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -848
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b5704a52-2032-4f8c-97b8-fc1b758065f6",
      "name": "Send Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        64,
        -224
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "741be234-6dca-4a98-b931-808d1d8ad32e",
      "name": "Send Notification image not valid",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1616,
        128
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "7e1f9c61-2130-4390-85f2-5bdd27e8767c",
      "name": "Send notification duplicate",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2096,
        -80
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "16d68a8c-60ef-436e-89a6-af22fe57a918",
      "name": "Telegram get file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        240,
        -48
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "0fdb8423-d76a-4561-b832-45aed67b683c",
      "name": "JSON output parsing",
      "type": "n8n-nodes-base.set",
      "position": [
        960,
        -48
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "71f1d4a1-3bf6-4030-9d78-1d52775c71bd",
      "name": "Send confirmation message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2096,
        256
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a3576579-cb15-4324-8920-b3787ed336b6",
      "name": "Parse receipt data with AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        624,
        -48
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "b07deb69-9ce2-4015-8771-14a5802d6148",
      "name": "Extract Telegram chat and file ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -352,
        -208
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "adb93c83-4894-4b95-a58a-9c7d83b01bd7",
      "name": "Check if image was uploaded",
      "type": "n8n-nodes-base.if",
      "position": [
        -144,
        -208
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "102aaa27-07a3-4021-96b2-0cc39dc2bbfe",
      "name": "Validate required transaction fields",
      "type": "n8n-nodes-base.if",
      "position": [
        1360,
        -48
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "87ecde57-e303-4a87-a71f-e04a33cc29df",
      "name": "Check for duplicate transaction",
      "type": "n8n-nodes-base.if",
      "position": [
        1824,
        -64
      ],
      "parameters": {},
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "feb8c68e-5132-4949-8b49-2bbb85e348c8",
      "name": "Normalize transaction data",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        -48
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "70ddd1c8-c268-4e07-b6db-fcf16e1fc2f4",
      "name": "Check existing transaction in Excel",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        1616,
        -64
      ],
      "parameters": {},
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "276fcaca-0320-4167-b20f-ebf34944cef3",
      "name": "Save transaction to Excel",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        2096,
        96
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "76e71511-5fd0-48e3-b413-c872e2b58fda",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -848
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "984ad9dc-a337-4d44-98da-45d91f8da683",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -144
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "74153927-8fb0-4729-aeb2-a78fa61cde5f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        -224
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1806959a-9d7f-40f5-a66d-074923eba94e",
  "connections": {
    "Tesseract OCR": {
      "main": [
        [
          {
            "node": "Parse receipt data with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Extract Telegram chat and file ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Parse receipt data with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Telegram get file": {
      "main": [
        [
          {
            "node": "Tesseract OCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Configurations": {
      "main": [
        [
          {
            "node": "Normalize transaction data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON output parsing": {
      "main": [
        [
          {
            "node": "Normalize transaction data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Configurations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save transaction to Excel": {
      "main": [
        []
      ]
    },
    "Send confirmation message": {
      "main": [
        []
      ]
    },
    "Normalize transaction data": {
      "main": [
        [
          {
            "node": "Validate required transaction fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse receipt data with AI": {
      "main": [
        [
          {
            "node": "JSON output parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if image was uploaded": {
      "main": [
        [
          {
            "node": "Send Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram get file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for duplicate transaction": {
      "main": [
        [
          {
            "node": "Send notification duplicate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save transaction to Excel",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send confirmation message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Telegram chat and file ID": {
      "main": [
        [
          {
            "node": "Check if image was uploaded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check existing transaction in Excel": {
      "main": [
        [
          {
            "node": "Check for duplicate transaction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate required transaction fields": {
      "main": [
        [
          {
            "node": "Check existing transaction in Excel",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Notification image not valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

OCR + AI + Duplicate Protection (n8n Workflow)

Source: https://n8n.io/workflows/13897/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Output Parser Structured, Telegram, N8N Nodes Tesseractjs +14
AI & RAG

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8
AI & RAG

Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon

OpenAI, HTTP Request, OpenAI Chat +7
AI & RAG

Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I

Redis, Agent Tool, Google Calendar +10