Skip to main content

Extract Arabic text from PDFs with Mistral OCR, Telegram Bot & Google Docs

Workflow preview

Workflow preview
100%
Extract Arabic text from PDFs with Mistral OCR, Telegram Bot & Google Docs preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Arabic OCR Telegram Bot How it Works 1. Receive PDF Files Users send PDF documents via Telegram to the bot 2. OCR Processing Mistral AI's OCR service extracts Arabic text from document pages 3. Tex...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.telegram, n8n-nodes-base.telegramtrigger, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.googledocs, n8n-nodes-base.splitinbatches

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Extract Arabic text from PDFs with Mistral OCR, Telegram Bot & Google Docs
Workflow name
Extract Arabic text from PDFs with Mistral OCR, Telegram Bot & Google Docs

Arabic OCR Telegram Bot

How it Works

  1. Receive PDF Files - Users send PDF documents via Telegram to the bot
  2. OCR Processing - Mistral AI's OCR service extracts Arabic text from document pages
  3. Text Organization - Processes and formats extracted content with page numbers
  4. Create Google Doc - Generates a formatted document with all extracted text
  5. Deliver Results - Sends users a clickable link to their processed document

Set up Steps

Setup Time: ~20 minutes

  1. Create Telegram Bot - Get bot token from @BotFather on Telegram
  2. Configure APIs - Set up Mistral AI OCR and Google Docs API credentials
  3. Set Folder Permissions - Create Google Drive folder for storing results
  4. Test Bot - Send a sample Arabic PDF to verify OCR accuracy
  5. Deploy Webhook - Activate the Telegram webhook for real-time processing

Detailed API configuration and Arabic text handling notes are included as sticky notes within the workflow.


What You'll Need:

  • Telegram Bot Token (free from @BotFather)
  • Mistral AI API key (OCR service)
  • Google Docs/Drive API credentials
  • Google Drive folder for document storage
  • Sample Arabic PDF files for testing

Key Features:

  • Real-time progress updates (5-step process notifications)
  • Automatic page numbering in Arabic
  • Direct Google Docs integration
  • Error handling for non-PDF files

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 - ๐Ÿ“‹ Workflow Overview

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

Block 2 - Download Document from Telegram

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

Block 3 - Telegram Bot Trigger

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

Block 4 - Check If Document Attached

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

Block 5 - ๐Ÿ” Document Validation

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

Block 6 - Upload PDF to Mistral AI

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - ๐Ÿ“ค Mistral AI Upload

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

Block 8 - Get Mistral Signed URL

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Process OCR with Mistral

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 10 - ๐Ÿค– OCR Processing

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

Block 11 - Parse OCR Results by Page

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Update Google Doc with Content

Type / Role
n8n-nodes-base.googleDocs - googleDocs
Config choices
Version 2

Block 13 - Create New Google Doc

Type / Role
n8n-nodes-base.googleDocs - googleDocs
Config choices
Version 2

Block 14 - ๐Ÿ“„ Google Docs Creation

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

Block 15 - Process Document Updates

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 16 - Aggregate OCR Results

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

Block 17 - Send Document Link to User

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

Block 18 - Request PDF File Format

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

Block 19 - Status: File Received (1/5)

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

Block 20 - Status: Sent to Processor (2/5)

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

Block 21 - Status: File Signed (3/5)

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

Block 22 - Status: Results Received (4/5)

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

Block 23 - Status: Creating Document (5/5)

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

Block 24 - ๐Ÿ“ˆ Progress Updates

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

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

3. Summary Table

Workflow Extract Arabic text from PDFs with Mistral OCR, Telegram Bot & Google Docs
Complexity advanced
Nodes 25
Categories Document Extraction, Multimodal AI
Author Abdulrahman Alhalabi
Published 26 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7892/7892.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 Extract Arabic text from PDFs with Mistral OCR, Telegram Bot & Google Docs do?

Arabic OCR Telegram Bot How it Works 1. Receive PDF Files Users send PDF documents via Telegram to the bot 2. OCR Processing Mistral AI's OCR service extracts Arabic text from document pages 3. Tex...

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 Document Extraction, Multimodal AI use case.