n8n

How to Generate Telegram Image Descriptions?

Send a photo to a Telegram bot and receive a detailed text description in seconds. Great for content and social teams that need quick alt text, product notes, or visual summaries without leaving chat. It keeps the work fast and simple.

The flow starts when Telegram receives a new message with a photo. The bot fetches the file from Telegram, converts the image to base64, and sends it to the Groq vision model through an HTTP request. The response is parsed to keep only the message text, then the bot replies in the same chat with the description. This setup turns a manual, time consuming task into a quick step inside Telegram, which helps teams speed up content prep and maintain consistent quality.

You need a Telegram bot token and a Groq API key. Add your keys in n8n, replace the placeholder token in the HTTP header, and keep the chatId and content mapping as shown. Expect faster content delivery, fewer edits, and better accessibility text. Useful for social posts, product catalogs, and support teams who need a clear summary of customer images.

What are the key features?

  • Telegram event trigger listens for new messages with photos
  • File retrieval pulls the image from Telegram using the file id
  • Base64 conversion turns the binary image into a text format required by the vision API
  • HTTP request sends the image and prompt to the Groq vision endpoint
  • Set node extracts only the description text from the API response
  • Reply in the same Telegram chat with the generated description

What are the benefits?

  • Reduce manual image description work from minutes to seconds per image
  • Automate most caption and alt text writing for consistent output
  • Keep all steps in Telegram so teams do not switch tools
  • Improve accessibility by delivering clear, detailed image text
  • Scale to handle more images without adding staff

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 Groq. See the Tools Required section above for links to create accounts with these services.
  3. In the Telegram app, talk to BotFather and create a new bot. Copy the bot token.
  4. In n8n Cloud, open Credentials and create a new Telegram credential. Paste the bot token and save. Use a clear name like Telegram Bot Prod.
  5. Open the Telegram Trigger node and select your Telegram credential. Click the test option if available and send a message to your bot to confirm it receives updates.
  6. Open the Telegram node named Receive the File and select the same Telegram credential. Ensure the fileId expression is set to {{$json.message.photo[0].file_id}}.
  7. Check the Extract From File node and confirm the operation converts the image to base64 so the next step can read it.
  8. Create a Groq API key in your Groq account. In the HTTP Request node, replace YOUR_API_TOKEN in the Authorization header with your key. Keep Content Type as application json.
  9. Review the JSON body in the HTTP Request node to ensure the base64 value is referenced and the data URL prefix is included as shown.
  10. Open the Telegram send the text node and select your Telegram credential. Keep the chatId expression so replies go back to the same user.
  11. Run a live test. Send a photo to your bot and confirm you receive a detailed description in the chat. In n8n, check the execution log for a 200 status on the HTTP request.
  12. Troubleshoot common issues. If no reply, verify the Groq key is correct, confirm the bot token and credentials, and ensure the message contains a photo. If the image quality is low, try using a higher resolution photo from Telegram if available.

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.

Free tier: $0, API key usable via API (rate‑limited)

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.