Automation library · Money admin

Log Telegram receipt images to Excel 365 with Tesseract OCR

Started by an incoming Telegram message, and works across Excel and Telegram. It hands the judgement calls to OpenAI. 18 steps, 3 branches: a working afternoon to understand properly.

MediumCalls a model: OpenAI

18 stepsMedium: a working afternoon
3Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 2Logic 6Service 9

The steps in the order they run, from what starts it.

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Extract Telegram chat and file IDSetLogic
  4. 4Parse receipt data with AIAgentModel
  5. 5Check if image was uploadedIfLogic
  6. 6JSON output parsingSetLogic
  7. 7Send NotificationTelegramService
  8. 8Telegram get fileTelegramService
  9. 9Normalize transaction dataSetLogic
  10. 10Get ConfigurationsMicrosoft ExcelService
  11. 11Tesseract OCRTesseract NodeService
  12. 12Validate required transaction fieldsIfLogic
  13. 13Check existing transaction in ExcelMicrosoft ExcelService
  14. 14Send Notification image not validTelegramService
  15. 15Check for duplicate transactionIfLogic
  16. 16Send notification duplicateTelegramService
  17. 17Save transaction to ExcelMicrosoft ExcelService
  18. 18Send confirmation messageTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
18, with 3 branches
Size
Medium: a working afternoon
Connects to
Excel, Telegram
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Excel and Telegram accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 18 steps before you point it at anything that matters.