# Extract text from images & PDFs with Telegram and Mistral: n8n workflow

> 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.

Source: https://millionrounds.com/workflow/extract-text-from-images-and-pdfs-with-telegram-and-mistral (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# 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

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fextract-text-from-images-and-pdfs-with-telegram-and-mistral)

**32 steps** Large: read it before trusting it with anything live

**9** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 3 Logic 14 Service 15

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

- 1 **Manual Webhook Setup Trigger** Manual trigger *Starts it*
- 2 **Incoming request** Webhook *Starts it*
- 3 **Telegram Webhook Configuration** Set *Logic*
- 4 **Settings** Set *Logic*
- 5 **Check Production Mode** If *Logic*
- 6 **Determine Incoming Request Source Type** Switch *Logic*
- 7 **Set Production Webhook** Http Request *Service*
- 8 **Set Development Webhook** Http Request *Service*
- 9 **Telegram Event Handler** Switch *Logic*
- 10 **Get a file** Telegram *Service*
- 11 **Return Webhook Status** Http Request *Service*
- 12 **Is Whitelist Disabled?** If *Logic*
- 13 **Respond with attachment** Respond To Webhook *Starts it*
- 14 **Status “Typing…”** Telegram *Service*
- 15 **Whitelist Logic** Code *Logic*
- 16 **Determine Message Type** Switch *Logic*
- 17 **Check Whitelist Status** If *Logic*
- 18 **Command Router** Switch *Logic*
- 19 **Checking file size** If *Logic*
- 20 **Notification about correct commands** Telegram *Service*
- 21 **Access Denied** Telegram *Service*
- 22 **Inform Bot Capabilities** Telegram *Service*
- 23 **File classifier** Code *Logic*
- 24 **Maximum file size exceeded** Telegram *Service*
- 25 **Image / PDF** If *Logic*
- 26 **Generating temporary file link** Telegram *Service*
- 27 **Invalid file** Telegram *Service*
- 28 **Mistral OCR** Http Request *Service*
- 29 **Markdown converter** Code *Logic*
- 30 **Problem with file recognition** Telegram *Service*
- 31 **Converting Markdown to File** Convert To File *Service*
- 32 **Send Markdown File to Telegram** Telegram *Service*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fextract-text-from-images-and-pdfs-with-telegram-and-mistral)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**PDF RAG agent with Telegram** 32 steps · calls a model · Google Drive, Telegram](https://millionrounds.com/workflow/pdf-rag-agent-with-telegram)
- [**Automated workflow backup with GitHub** 28 steps · GitHub, Telegram](https://millionrounds.com/workflow/automated-workflow-backup-with-github)
- [**Provide academic OCR and RAG answers on Telegram with Gemini** 28 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/provide-academic-ocr-and-rag-answers-on-telegram-with-gemini)
- [**Verify onboarding compliance documents with OpenAI** 37 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/verify-onboarding-compliance-documents-with-openai)
- [**Extract text from Google Drive files to Google Sheets** 25 steps · Google Docs, Google Drive](https://millionrounds.com/workflow/extract-text-from-google-drive-files-to-google-sheets)
- [**Backup Workflow/Credential To Dropbox with Telegram** 23 steps · Dropbox, Telegram](https://millionrounds.com/workflow/backup-workflow-credential-to-dropbox-with-telegram)
