n8n

How to Automate Telegram Image Analysis Replies?

Turn your Telegram bot into a fast image analyst that replies in chat. When someone shares a photo, the bot reads the image and sends back clear text. It is great for moderation, quick tagging, and instant feedback in groups or channels.

Here is how it runs behind the scenes. A Telegram trigger listens for new messages and downloads the image. A Switch node checks if the message has a photo. If it is an image, the OpenAI node analyzes the base64 file and produces a text summary. The reply is sent back through Telegram using the same chat ID. If someone posts text or a non image file, a short wait is added and then a helpful message asks for an image. This keeps chats tidy and avoids confusion.

You need a Telegram bot token and an OpenAI API key. Connect both in n8n, enable image download on the trigger, and keep the default chat mapping to reply in the correct thread. Expect faster review times and fewer manual checks, especially in busy groups. Common uses include brand community image checks, quick support on screenshots, and basic content tagging in operations teams.

What are the key features?

  • Telegram trigger captures new messages and downloads images for analysis
  • Switch logic routes image messages to AI and non images to a helpful prompt
  • OpenAI image analysis reads base64 data and returns clear text output
  • Telegram send node replies in the same chat using the original chat ID
  • Wait step adds a short delay before sending the error prompt for non images
  • Separate credentials for Telegram and OpenAI keep access secure and simple

What are the benefits?

  • Reduce manual review from 10 minutes per image to under 30 seconds
  • Automate up to 90 percent of routine replies for image posts
  • Handle up to 5 times more image messages without new staff
  • Cut context switching by keeping analysis and replies inside Telegram

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Telegram and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Create a Telegram bot using BotFather and copy the bot token.
  4. In the n8n credentials manager, create a new Telegram credential and paste the bot token. Save it with a clear name so you can find it later.
  5. Open the Telegram Trigger node, select your Telegram credential, and ensure Download is enabled so images are saved for analysis.
  6. Generate an API key in your OpenAI account from the API page.
  7. In the n8n credentials manager, create a new OpenAI credential and paste your API key. Save it with a clear name.
  8. Open the Analyze image node, choose your OpenAI credential, confirm input type is base64, and leave the analyze operation selected.
  9. Open the Telegram send nodes and keep the chatId mapped to the original chat so replies go to the correct conversation. Ensure the text field uses the analysis output.
  10. Activate the workflow and send a test image to your bot. You should receive a text analysis in the same chat.
  11. Send a non image message to confirm the wait and error prompt appear after a short delay.
  12. If you get no reply, start a chat with your bot, confirm the bot is added to the group if used in a group, and check the n8n execution log for errors.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Telegram

Sign up

Free: $0, Telegram Bot API usage is free for developers

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.