Skip to main content

Analyze images & extract text with GPT-4o Vision and Telegram

Workflow preview

Workflow preview
100%
Analyze images & extract text with GPT-4o Vision and Telegram preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Who’s it for Teams and makers who want a plug and play vision bot: users send a photo in Telegram, the bot returns a concise description plus OCR text. No custom servers r...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.telegramtrigger, n8n-nodes-base.telegram, n8n-nodes-base.extractfromfile, n8n-nodes-base.code, n8n-nodes-base.httprequest

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by AI/ML API | D1m7asis.

Original n8n.io source

1.1 Workflow description

Title
Analyze images & extract text with GPT-4o Vision and Telegram
Workflow name
Analyze images & extract text with GPT-4o Vision and Telegram

Who’s it for

Teams and makers who want a plug-and-play vision bot: users send a photo in Telegram, the bot returns a concise description plus OCR text. No custom servers required—just n8n, a Telegram bot, and an AIMLAPI key.

What it does / How it works

The workflow listens for new Telegram messages, fetches the highest-resolution photo, converts it to base64, normalizes the MIME type, and calls AIMLAPI (GPT-4o Vision) via the HTTP Request node using the OpenAI-compatible messages format with an image_url data URI. The model returns a short caption and extracted text. The answer is sent back to the same Telegram chat.

Requirements

  • n8n instance (self-hosted or cloud)
  • Telegram bot token (from @BotFather)
  • AIMLAPI account and API key (OpenAI-compatible endpoint)

How to set up

  1. Create a Telegram bot with @BotFather and copy the token.
  2. In n8n, add Telegram credentials (no hardcoded tokens in nodes).
  3. Add AIMLAPI credentials with your API key (base URL: https://api.aimlapi.com/v1).
  4. Import the workflow JSON and connect credentials in the nodes.
  5. Execute the trigger and send a photo to your bot to test.

How to customize the workflow

  • Modify the vision prompt (e.g., add brand, language, or formatting rules).
  • Switch models within AIMLAPI (any vision-capable model using the same messages schema).
  • Add an IF branch for text-only messages (reply with guidance).
  • Log usage to Google Sheets or a database (user id, file id, response).
  • Add rate limits, user allowlists, or Markdown formatting in Telegram responses.
  • Increase timeouts/retries in the HTTP Request node for long-running images.

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 - Sticky Note — Overview

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

Block 2 - Sticky Note — Setup Guide

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

Block 3 - Sticky Note — Receive Message

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

Block 4 - Sticky Note — GPT‑5 Processing

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

Block 5 - Sticky Note — Send Response

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

Block 6 - Sticky Note — Logging

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

Block 7 - Sticky Note — Receive Message1

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

Block 8 - Sticky Note — Send Response1

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

Block 9 - Sticky Note — Logging1

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

Block 10 - Step 1 · 📩 Telegram Trigger (In)

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

Block 11 - Step 1.5 · 💬 Typing…

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

Block 12 - Step 2 · 📷 Get Photo

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

Block 13 - Step 3 · 🧩 Extract → base64

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

Block 14 - Step 3.5 · 🧑‍💻 Build Data URI

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

Block 15 - Step 4 · 🧠 AIMLAPI Vision (HTTP)

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

Block 16 - Step 5 · 📤 Reply to Telegram

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

3. Summary Table

Workflow Analyze images & extract text with GPT-4o Vision and Telegram
Complexity advanced
Nodes 16
Categories Support Chatbot, AI Chatbot
Author AI/ML API | D1m7asis
Published 02 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8185/8185.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 Analyze images & extract text with GPT-4o Vision and Telegram do?

Who’s it for Teams and makers who want a plug and play vision bot: users send a photo in Telegram, the bot returns a concise description plus OCR text. No custom servers r...

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 Support Chatbot, AI Chatbot use case.