Automation library · Documents and files

Extract text from images & PDFs with Telegram and Mistral

Started by another system calling it, and works across Telegram. 32 steps, 9 branches: large, and worth reading before you trust it with anything live.

Large

32 stepsLarge: read it before trusting it with anything live
9Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 3Logic 14Service 15

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

  1. 1Manual Webhook Setup TriggerManual triggerStarts it
  2. 2Incoming requestWebhookStarts it
  3. 3Telegram Webhook ConfigurationSetLogic
  4. 4SettingsSetLogic
  5. 5Check Production ModeIfLogic
  6. 6Determine Incoming Request Source TypeSwitchLogic
  7. 7Set Production WebhookHttp RequestService
  8. 8Set Development WebhookHttp RequestService
  9. 9Telegram Event HandlerSwitchLogic
  10. 10Get a fileTelegramService
  11. 11Return Webhook StatusHttp RequestService
  12. 12Is Whitelist Disabled?IfLogic
  13. 13Respond with attachmentRespond To WebhookStarts it
  14. 14Status “Typing…”TelegramService
  15. 15Whitelist LogicCodeLogic
  16. 16Determine Message TypeSwitchLogic
  17. 17Check Whitelist StatusIfLogic
  18. 18Command RouterSwitchLogic
  19. 19Checking file sizeIfLogic
  20. 20Notification about correct commandsTelegramService
  21. 21Access DeniedTelegramService
  22. 22Inform Bot CapabilitiesTelegramService
  23. 23File classifierCodeLogic
  24. 24Maximum file size exceededTelegramService
  25. 25Image / PDFIfLogic
  26. 26Generating temporary file linkTelegramService
  27. 27Invalid fileTelegramService
  28. 28Mistral OCRHttp RequestService
  29. 29Markdown converterCodeLogic
  30. 30Problem with file recognitionTelegramService
  31. 31Converting Markdown to FileConvert To FileService
  32. 32Send Markdown File to TelegramTelegramService

How it's built

Starts on
Another system calling it
Steps
32, with 9 branches
Size
Large: read it before trusting it with anything live
Connects to
Telegram
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Telegram account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 32 steps it is large: read it before trusting it with anything live.

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 32 steps before you point it at anything that matters.