🔓 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 Sheets: AI images you can reuse

Lisa Granqvist Partner Workflow Automation Expert

Your best image ideas show up at the worst time. You DM yourself a prompt in Telegram, generate something later, then… it vanishes into a downloads folder, a random Drive link, or an old chat thread you’ll never search again.

This is where Telegram image automation pays off fast. Marketing managers trying to keep campaigns consistent feel it first, but founders and agency creatives get stuck in the same loop. You want reusable assets, not one-off images you can’t find when you need them.

This workflow turns a simple Telegram message into an AI image, sends it back to you, and logs it in Google Sheets (with an optional Drive upload) so your assets stay searchable. You’ll see how it works, what you need, and where teams usually trip up.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Telegram + Google Sheets: AI images you can reuse

The Problem: AI images get created, then lost

Generating images is the easy part. The messy part is everything around it: rewriting prompts so they’re detailed enough, tracking which concept you used for which campaign, and saving the final image somewhere your team can actually reuse. In practice, it turns into scattered links, inconsistent naming, and “Can you resend that one from last week?” messages that derail your day. After a month, you’ve created dozens of assets but you can’t confidently answer basic questions like which style performed best, or what prompt produced that hero image your client liked.

It adds up fast. Here’s where it usually breaks down.

  • You retype or “polish” prompts every time, which burns creative energy on repeat work.
  • Images get saved inconsistently, so the same idea gets generated twice because nobody can find the original.
  • Sharing is clunky, and approvals stall when the only “system” is scrolling through Telegram.
  • Without a log of titles, links, and dates, scaling from a few images to a real library becomes chaos.

The Solution: Telegram-to-OpenAI images with a searchable log

This n8n workflow listens for new messages sent to your Telegram bot and treats each message as a rough image idea. It then expands that idea using an OpenAI chat model, turning “quick thoughts” into a richer prompt with style, context, and useful detail. Next, the workflow sends the expanded prompt to OpenAI’s image endpoint to generate the image. When the file is ready, n8n fetches it, sends the finished image back to you in Telegram, and (optionally) stores it in a Google Drive folder. Finally, it logs the image record in Google Sheets so you can search, filter, and reuse assets later without guessing where anything went.

The workflow starts with a Telegram message. OpenAI turns that message into a production-ready prompt, then generates the image. From there, the image is delivered back to Telegram and saved with a clean record in Google Sheets (plus Drive storage if you enable it).

What You Get: Automation vs. Results

Example: What This Looks Like

Say you create 20 campaign images a week. Manually, you might spend about 10 minutes writing a better prompt, 5 minutes generating, and another 5 minutes saving and documenting the link, which is roughly 20 minutes per image (around 6 hours a week). With this workflow, you send a Telegram message in under a minute, wait for the image generation, and the Drive/Sheets logging happens in the background. You still review the output, but the busywork mostly disappears, so that weekly admin time drops to about an hour.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram to collect prompts and deliver images.
  • OpenAI for prompt expansion and image generation.
  • Telegram bot token (get it from @BotFather in Telegram)
  • OpenAI API key (get it from platform.openai.com)
  • Google Sheets to log titles and links (optional).
  • Google Drive to store images in a folder (optional).

Skill level: Beginner. You’ll paste API keys, connect Google, and update a folder and sheet ID if you enable logging.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A Telegram message triggers everything. You send your bot an idea like “a futuristic coffee shop at sunrise” and n8n captures that message instantly.

The idea gets upgraded into a real prompt. An OpenAI chat model expands your short text into something more descriptive, so the image generator has enough detail to stay consistent across a series.

OpenAI generates the image and n8n fetches the file. The workflow sends the expanded prompt to the image API, then downloads the resulting image so it can be reused elsewhere (not just viewed in a response).

The output gets delivered and organized. The image is sent back to you in Telegram, stored in a Google Drive folder if you enable that node, and a Google Sheets row is created so you can search by title, date, or campaign later.

You can easily modify the prompt style 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 workflow entry point so Telegram messages initiate the automation.

  1. Add the Incoming Telegram Start node as the trigger.
  2. Set Updates to message.
  3. Credential Required: Connect your telegramApi credentials in Incoming Telegram Start.

Step 2: Set Up the AI Prompt Composer

Use the agent and language model to transform the Telegram message into an optimized image prompt.

  1. Add Compose Image Prompt and set Text to {{ $json.message.text }}.
  2. In Compose Image Prompt, keep Prompt Type set to define and set System Message to Overview\nYou are an expert image prompt engineer. .
  3. Add OpenAI Chat Engine and select the model gpt-4o-mini.
  4. Credential Required: Connect your openAiApi credentials in OpenAI Chat Engine.
  5. Ensure OpenAI Chat Engine is connected as the language model for Compose Image Prompt (credentials should be added to OpenAI Chat Engine, not the agent node).

Step 3: Configure the Image Generation Requests

Send the generated prompt to the image API and retrieve the resulting file.

  1. Add Generate Image Request and set URL to https://api.openai.com/v1/images/generations.
  2. Set Method to POST, enable Send Body and Send Headers.
  3. Under Body Parameters, set prompt to {{ $json.output }} and size to 1024x1024.
  4. Under Header Parameters, set Authorization to Bearer [CONFIGURE_YOUR_TOKEN].
  5. Add Fetch Image File and set URL to {{ $json.data[0].url }}.

⚠️ Common Pitfall: The Generate Image Request node uses a hard-coded token placeholder. Replace [CONFIGURE_YOUR_TOKEN] with your actual OpenAI API key before testing.

Step 4: Configure Output Destinations

Save the generated image to Drive, log it in Sheets, and send it back to Telegram. The workflow branches in parallel after the image file is fetched.

  1. Connect Fetch Image File to both Store in Drive Folder and Dispatch Photo Message in parallel.
  2. In Store in Drive Folder, set Name to ai image, Drive to My Drive, and Folder to / (Root folder).
  3. Credential Required: Connect your googleDriveOAuth2Api credentials in Store in Drive Folder.
  4. Connect Store in Drive Folder to Log Image Record and set Operation to append.
  5. In Log Image Record, set Document to [YOUR_ID] and Sheet to Sheet1 (gid=0).
  6. Map Title to {{ $json.name }} and Heygen video url to {{ $json.webViewLink }}.
  7. Credential Required: Connect your googleSheetsOAuth2Api credentials in Log Image Record.
  8. In Dispatch Photo Message, set Operation to sendPhoto, enable Binary Data, and set Chat ID to {{ $('Incoming Telegram Start').item.json.message.from.id }}.
  9. Credential Required: Connect your telegramApi credentials in Dispatch Photo Message.

Tip: Fetch Image File outputs to both Store in Drive Folder and Dispatch Photo Message in parallel, so Drive uploads and Telegram replies occur simultaneously.

Step 5: Test and Activate Your Workflow

Validate the end-to-end flow and turn the automation on for production use.

  1. Click Execute Workflow and send a Telegram message to your bot to trigger Incoming Telegram Start.
  2. Confirm Compose Image Prompt outputs a refined prompt and Generate Image Request returns a URL.
  3. Verify that Dispatch Photo Message sends an image back to the originating Telegram chat.
  4. Check that Store in Drive Folder uploads the image and Log Image Record appends a new row with the file name and link.
  5. Toggle the workflow to Active once results are correct.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Telegram bot credentials can expire or be pasted incorrectly. If replies suddenly stop, check the bot token in n8n Credentials and confirm the bot still works in Telegram.
  • 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.

Frequently Asked Questions

How long does it take to set up this Telegram image automation automation?

About 30 minutes if you already have your API keys.

Do I need coding skills to automate Telegram image automation?

No. You’ll mostly connect accounts and paste credentials into n8n.

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 OpenAI API costs, which are usually a few cents per image depending on model and size.

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 customize this Telegram image automation workflow for a consistent brand style?

Yes, and you should. The easiest win is updating the “Compose Image Prompt” prompt so it always includes your style rules (colors, lighting, composition, “avoid text,” and so on). You can also swap the image generation settings in the “Generate Image Request” node to change size/quality, then keep the same Google Sheets logging so everything stays searchable.

Why is my Telegram connection failing in this workflow?

Most of the time it’s the bot token, not the workflow. Regenerate or re-copy the token from @BotFather, then update the Telegram credentials in n8n and re-test by sending a fresh message. Also confirm your Telegram Trigger is the active trigger node, because importing templates sometimes leaves the workflow inactive. If it fails only during busy periods, Telegram or your server may be rate limiting, so slowing requests (or moving to n8n Cloud) can help.

How many images can this Telegram image automation automation handle?

A lot, but it depends on where you run it. On n8n Cloud, your monthly execution limit depends on plan, and each image typically uses a few executions across prompt expansion, generation, fetching, and logging. If you self-host, there’s no fixed execution cap, but throughput depends on your server and OpenAI rate limits. In practical terms, most small teams run dozens to a few hundred images a week without thinking about it, then adjust once they scale.

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

Often, yes, because this flow is more than a simple “trigger → action.” n8n handles multi-step logic (expand prompt, generate, fetch file, store, log, respond) without feeling like you’re fighting the tool or paying extra for branching. Self-hosting is also a big deal if you want unlimited runs and more control over data. Zapier or Make can still be fine if you only need a lightweight two-step automation and don’t care about custom prompt logic. If you’re unsure, Talk to an automation expert and we’ll sanity-check your use case.

Once this is running, your best ideas don’t disappear. They turn into usable assets with a paper trail in Sheets, ready for the next campaign.

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