🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Telegram + Google Gemini: images delivered in chat

Lisa Granqvist Partner Workflow Automation Expert

You open Telegram to capture a quick idea, then you lose 20 minutes hopping between AI tools, prompt docs, and downloads just to get one usable image.

Content marketers feel it when deadlines pile up. A social media manager feels it when approvals come late. And if you run a small business, it’s the same story: Telegram image automation turns “rough idea” into “ready-to-share visual” without leaving chat.

This workflow takes a Telegram message, uses Google Gemini to improve the prompt, generates the image via Pollinations, and sends the finished image back to you. You’ll see how it works, what you need, and what to tweak.

How This Automation Works

Here’s the complete workflow you’ll be setting up:

n8n Workflow Template: Telegram + Google Gemini: images delivered in chat

Why This Matters: Fast Visuals Without Tool-Hopping

Most “quick image requests” aren’t actually quick. You start with a half-formed idea, paste it into an AI tool, get something off-brand, then rewrite the prompt, regenerate, download, rename, and finally upload it back into a chat or content doc. Do that a few times a day and you’ve quietly burned about 2 hours on work that isn’t creative. The worst part is the context switching. You lose the thread, approvals get delayed, and you end up redoing images because the first version wasn’t consistent with your style.

It adds up fast. Here’s where it breaks down in real teams.

  • Ideas arrive in Telegram, but the actual image generation happens somewhere else, so requests get missed or delayed.
  • Prompt quality varies from person to person, which means the “same campaign” looks like three different brands.
  • Downloads become a mess because files are unnamed, duplicated, or saved in the wrong place.
  • You end up doing manual QA in the worst way: regenerate, re-upload, and explain the changes in chat.

What You’ll Build: Telegram to Gemini to Image, Automatically

This workflow turns Telegram into your “image request desk.” A user sends a message to your bot (anything from a rough concept to a detailed brief). n8n picks it up, applies your default settings (like style hints, size, and formatting), then runs the idea through a Gemini-powered prompt agent to make it more specific and more visual. Next, n8n builds the final payload and sends it to Pollinations to render the image. When Pollinations returns the result, the workflow sends the image right back into Telegram as a photo, and it can also save a local copy for archiving. The result is simple: less back-and-forth, fewer tabs, and consistently better prompts without needing a “prompt expert” on every request.

The workflow starts from a Telegram message. Gemini upgrades that message into a stronger image prompt you can reuse. Pollinations generates the actual image, and Telegram gets the finished file so it’s instantly shareable.

What You’re Building

Expected Results

Say you need 5 visuals a day for posts, stories, or quick promo mockups. Manually, it’s usually about 10 minutes per image once you count prompt tweaking, regenerations, downloading, renaming, and re-uploading, so roughly 50 minutes daily. With this workflow, you send the request in Telegram (about a minute), wait for generation, and the image comes back into the same chat. You typically get most of that hour back, and the process feels calmer.

Before You Start

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram Bot for receiving requests and replying with images
  • Google Gemini API to generate higher-quality image prompts
  • Gemini API key (get it from Google AI Studio or Cloud Console)

Skill level: Beginner. You’ll connect accounts, paste an API key, and tweak a few text fields.

Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).

Step by Step

A Telegram message kicks it off. The Telegram Trigger listens for new messages sent to your bot, so requests are captured where your team already works.

Settings and formatting get applied. n8n maps your defaults (like image size, style notes, and how you want the request interpreted) so every prompt starts from the same baseline.

Gemini upgrades the prompt. A prompt crafting agent uses Google Gemini to turn “make a banner for our webinar” into something more specific, visual, and consistent with your direction. Then the workflow sanitizes the output and prepares it for rendering.

Pollinations generates the image, then Telegram receives it. n8n sends an HTTP request to Pollinations, receives the rendered result, and immediately posts it back into the chat as a Telegram photo. If you enable storage, it also writes the image file to disk for later reuse.

You can easily modify the prompt structure to match your brand voice based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Telegram Trigger

Set up the Telegram inbound trigger that starts the workflow and feeds the message into the pipeline.

  1. Add and open Telegram Message Trigger.
  2. Credential Required: Connect your telegramApi credentials.
  3. Keep Updates set to message.
  4. Optional: If you plan to use chat webhooks later, note that Chat Message Listener is currently disabled and connects to Map Input Settings.

If you enable Chat Message Listener, confirm that its webhook URL is registered and that it’s connected to Map Input Settings just like Telegram Message Trigger.

Step 2: Connect Input Settings

Map the incoming message and fixed image settings into a clean JSON structure.

  1. Open Map Input Settings.
  2. Set model to flux.
  3. Set width to 1080 and height to 1920.
  4. Set chat to {{ $json.message.text }}.
  5. Ensure Telegram Message Trigger (and optionally Chat Message Listener) connects to Map Input Settings.

Step 3: Set Up the AI Prompt Generator

Use Gemini to craft structured image prompts and pass them into the workflow.

  1. Open Gemini Chat Engine and set Model Name to models/gemini-2.0-flash.
  2. Credential Required: Connect your googlePalmApi credentials.
  3. Open Prompt Crafting Agent and set Text to {{ $json.chat }}.
  4. Keep Prompt Type set to define and enable Has Output Parser.
  5. Confirm Gemini Chat Engine is connected as the language model for Prompt Crafting Agent.

⚠️ Common Pitfall: Do not add credentials to Prompt Crafting Agent directly—credentials must be added to Gemini Chat Engine, which powers the agent.

Step 4: Normalize Output and Build the Image Request

Clean the AI output into a list of prompts, then construct the image request payload.

  1. Open Sanitize JSON Output and keep the JavaScript Code as provided to extract image_prompt from the AI response.
  2. Open Build Image Payload and keep the JavaScript Code that maps image_prompt into a request body with dimensions from Map Input Settings.
  3. Verify Sanitize JSON Output connects to Build Image Payload, and then to Generate File Label.
  4. Open Generate File Label and keep the file naming logic so each item gets images_001.png, images_002.png, etc.

Step 5: Configure Image Rendering and Parallel Outputs

Send the render request and deliver the output in parallel to storage and Telegram.

  1. Open Image Render Request and set URL to https://image.pollinations.ai/prompt/{{ $json.body.prompt }}.
  2. Set JSON Query to { "width": {{ $('Map Input Settings').item.json.width }}, "height": {{ $('Map Input Settings').item.json.height }}, "model": "{{ $('Map Input Settings').item.json.model }}", "seed": 42, "nologo": true }.
  3. Keep Send Query enabled and set Specify Query to json.
  4. Verify Image Render Request outputs to both Write Image to Storage and Send Telegram Photo in parallel.
  5. Open Write Image to Storage and set File Name to /files/{{ $('Generate File Label').item.json.fileName }} (note: this node is disabled by default).
  6. Open Send Telegram Photo and set Chat ID to your Telegram ID, with Operation as sendPhoto and Binary Data enabled.
  7. Credential Required: Connect your telegramApi credentials to Send Telegram Photo.

If you want local file output, enable Write Image to Storage and ensure the runtime environment has write access to /files.

Step 6: Test and Activate Your Workflow

Run a manual test, verify outputs, and then activate the automation.

  1. Click Execute Workflow and send a Telegram message to your bot with a sample prompt.
  2. Confirm that Prompt Crafting Agent returns a structured response and that Sanitize JSON Output produces image_prompt items.
  3. Verify Image Render Request returns an image response and that Send Telegram Photo delivers a photo to your chat.
  4. If enabled, confirm Write Image to Storage writes the file to /files/.
  5. Turn the workflow Active to enable production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Troubleshooting Tips

  • Telegram credentials can be correct but still fail if your bot privacy settings block messages in groups. Check BotFather settings and your n8n Telegram credentials first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Quick Answers

What’s the setup time for this Telegram image automation automation?

About 10–15 minutes if your Telegram bot and Gemini key are ready.

Is coding required for this Telegram image automation task?

No. You’ll paste credentials and adjust a couple of text fields. The workflow logic is already built.

Is n8n free to use for this Telegram image automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini API usage (it includes some free usage, but billing must be enabled).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I modify this Telegram image automation workflow for different use cases?

Yes, and you should. Most people customize the Prompt Crafting Agent so it always includes brand style notes, product details, or “do/don’t” rules. You can also change the Map Input Settings step to control image size and defaults. If you don’t want to save files locally, disable the Write Image to Storage node and keep everything inside Telegram.

Why is my Telegram connection failing in this workflow?

Usually it’s an invalid bot token or the wrong Telegram credentials selected in n8n. It can also happen when the bot is added to a group but can’t read messages due to privacy settings. If the trigger works but sending fails, confirm the chat ID is valid and the bot has permission to post photos.

What volume can this Telegram image automation workflow process?

It depends mostly on how fast the image rendering returns and how busy your n8n instance is. On n8n Cloud, your monthly execution limit depends on your plan, while self-hosting has no fixed cap (your server is the limit). Practically, many teams start with a few dozen requests a day and scale up once prompts are dialed in.

Is this Telegram image automation automation better than using Zapier or Make?

Often, yes. This flow benefits from having multiple “thinking” and processing steps, and n8n handles branching and custom logic without turning every small step into a pricing problem. You can also self-host, which matters when usage grows. Zapier or Make can still be fine for very simple two-step zaps, but prompt shaping plus image rendering usually gets fiddly. If you want the fastest path to “it just works,” Talk to an automation expert and we’ll point you to the right tool for your situation.

Once this is running, image requests stop being a distraction and start being a simple chat message. Set it up once, then let the workflow do the repetitive part.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal