Automate Image Analysis & Response on Telegram with n8n

This workflow automates image analysis for Telegram messages using n8n and OpenAI. It identifies if an image is present, analyzes it, and sends insightful text responses back, saving time and improving interaction accuracy on Telegram.
telegramTrigger
telegram
openAi
+3
Workflow Identifier: 1841
NODES in Use: Telegram Trigger, Telegram, Sticky Note, Wait, OpenAI (Langchain), Switch
Automate image analysis with n8n and OpenAI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow watches Telegram chats and reacts when someone sends an image.

It checks if the message has a photo and stops if it does not.

If an image is present, it sends the photo to OpenAI to analyze and describe it.

Then it sends back a message with the analysis to the same Telegram chat.

If no image is found, it tells the user to upload a valid photo.


Who should use this workflow

This is for people managing Telegram groups or chats where members share pictures.

If manual image checking wastes time or causes errors, this helps by automating image understanding.

No technical experience is needed to run it inside n8n.


Tools and Services Used


Inputs, Processing, and Outputs

Inputs

  • Incoming Telegram messages containing user photos.

Processing Steps

Outputs


Beginner step-by-step: How to build this in n8n

Import the workflow

  1. Download this workflow file using the Download button on this page.
  2. Open your n8n editor.
  3. Use the menu option “Import from File” and upload the downloaded workflow.

Configure credentials and settings

  1. Add your Telegram API credentials in the Telegram nodes.
  2. Insert your OpenAI API key in the OpenAI node credentials.
  3. Verify that the Telegram Trigger node has correct permissions to get images.
  4. Check if IDs like chat IDs, user IDs, or message fields match your Telegram setup; update them if needed.

Test and activate

  1. Send an image to your Telegram bot or account to test if the workflow triggers.
  2. Watch the execution and confirm the reply message with the image analysis arrives.
  3. Turn the workflow from draft to active mode in n8n to start using it live.

For hosting the workflow long term, consider using self-host n8n for better control and uptime.


Handling edge cases and failures

If the workflow says “No image found in the message,” the Switch node could be checking for the wrong field or the Telegram Trigger lacks the download permission.

Check the Switch node condition uses {{$json.message.photo}} properly.

If OpenAI gives an error or no useful text, make sure the image is correctly downloaded and base64 encoded.

Verify OpenAI API key is valid and API usage limits are not exceeded.


Customization ideas

  • Change the error reply text in the Telegram message node to fit the chat’s style.
  • Add more rules in the Switch node to check for captions or other media types.
  • Introduce a language detection node to translate or adjust prompts dynamically.
  • Save image analysis results in databases like Google Sheets for history and review.
  • Try swapping OpenAI with other AI services if preferred.

Summary of benefits

✓ Saves many hours by automating image reading and replying.

✓ Reduces mistakes from manual image understanding.

✓ Keeps Telegram conversations faster and more helpful.

✓ Simple to set up inside n8n with little coding.


Automate image analysis with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow sends a message asking the user to upload an image after a short wait.
It sends the photo in base64 format to OpenAI’s image analysis API and gets descriptive text back.
Yes, every image analysis request uses OpenAI API credits based on account pricing.
No, it only checks for photos. Extra nodes and models are needed for videos or GIFs.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.