🔓 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

OpenAI + Telegram: image requests turned into files

Lisa Granqvist Partner Workflow Automation Expert

You ask for “a quick image” in chat, then the real work starts. Prompts get rewritten, sizes get missed, someone forgets to save the final file, and the request thread turns into a messy scavenger hunt.

This hits marketers hardest when you’re trying to ship campaigns fast, but agency owners and solo creators feel it too. With OpenAI Telegram automation, you send one clean request and get back a ready-to-download image file without the back-and-forth.

This workflow turns a simple image prompt + size into an OpenAI-generated image, converts it into a proper file, and returns it for download (and easy sharing in Telegram). Below you’ll see how it works, what you’ll need, and what to tweak so it fits your process.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: OpenAI + Telegram: image requests turned into files

The Problem: Image Requests Get Lost in the Shuffle

On paper, “generate an image from a prompt” sounds simple. In practice, the request usually lives in the wrong place (a Telegram thread, a doc, someone’s notes), the specs are incomplete, and the output isn’t packaged in a way anyone can reuse. You end up re-asking the same questions: What size? Which style? Where’s the file? Then there’s the worst part: you do get an image, but it’s not delivered as a clean downloadable asset, so it still takes manual steps to share, store, or hand off.

It adds up fast, especially when the “one quick image” turns into five variations and a rushed handoff.

  • Requests come in with missing details, so you spend extra time clarifying basics like size and use case.
  • The final image often gets shared inconsistently, which makes it harder to find later or reuse for the next campaign.
  • Manual downloading and re-uploading creates little delays that stack up across a week.
  • People copy prompts from old chats, and the creative direction drifts without anyone noticing.

The Solution: Turn One Request Into a Downloadable Image File

This n8n workflow standardizes how image requests come in, generates the image via OpenAI’s image model (GPT-Image-1), then returns the result as an actual downloadable file. It starts with an intake form that collects the two details that always matter: the prompt and the image size. n8n then sends that request to OpenAI through an HTTP call. When the image comes back, the workflow converts the response into a proper binary file (so it behaves like a real asset, not a blob of data). Finally, it returns the file to the form output, ready for download and easy to share into Telegram when you need to move fast.

The workflow begins when you submit the form with your prompt and size. OpenAI generates the image, n8n converts it into a file, and the workflow responds with a clean download. Simple input, clean output.

What You Get: Automation vs. Results

Example: What This Looks Like

Say your team generates 10 images a week for ads, emails, and social. Manually, it’s usually about 10 minutes each to confirm specs, run the request, download the result, rename it, and share it back in Telegram, which is roughly 100 minutes a week. With this workflow, the “work” becomes one form submission that takes maybe a minute, then you simply download the returned file when it’s ready. That’s about 90 minutes back most weeks, and the process feels calmer too.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • OpenAI API for generating images from prompts
  • Telegram to share results with your team
  • OpenAI API key (get it from the OpenAI Platform dashboard)

Skill level: Beginner. You’ll connect credentials, confirm the form fields, and paste an API key.

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

How It Works

Image prompt intake through a form. You submit two fields: the image prompt and the size you want. That simple structure is what keeps requests consistent instead of drifting across chat messages.

OpenAI generates the image. n8n sends the prompt and size to the OpenAI image endpoint (GPT-Image-1) using an HTTP Request node. When OpenAI replies, the workflow keeps the returned image data attached to the same run, so you don’t have to handle it manually.

The response is converted into a real file. The workflow transforms the image output into a binary file, which means it behaves like a normal downloadable asset. This is the part that removes the annoying “now download it, rename it, and re-upload it” loop.

The file is returned for download and sharing. The final form step outputs the generated image file so you can download it immediately or forward it into Telegram. If you want, you can also extend this to save files into storage tools later.

You can easily modify the prompt format to enforce brand style guidelines based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Form Trigger

Set up the intake form that collects the image prompt and size before sending it to the image generation request.

  1. Add the Image Prompt Intake node as your trigger.
  2. Set the Form Title to OpenAI Image Generator.
  3. Configure the Prompt field with placeholder Snow-covered mountain village in the Alps and set it as required.
  4. Configure the Image size dropdown with options 1024x1024, 1024x1536, and 1536x1024, and set it as required.

You can keep Flowpast Branding as a visual note on the canvas; it does not affect execution.

Step 2: Connect OpenAI Image Generation

Configure the OpenAI API request that generates the image based on form input.

  1. Add the OpenAI Image Request node and connect it to Image Prompt Intake.
  2. Set the URL to https://api.openai.com/v1/images/generations and the Method to POST.
  3. Enable Send Body and Send Headers.
  4. Set the body parameters: model to gpt-image-1, prompt to ={{ $json.Prompt }}, n to ={{ 1 }}, and size to ={{ $json['Image size'] }}.
  5. Credential Required: Connect your openAiApi credentials.

⚠️ Common Pitfall: If the form field labels are changed, update the expressions in OpenAI Image Request to match the new field names.

Step 3: Set Up the Processing Node

Convert the Base64 image data from the OpenAI response into a binary file for return.

  1. Add the Transform to Binary File node and connect it to OpenAI Image Request.
  2. Set the Operation to toBinary.
  3. Set the Source Property to data[0].b64_json.

If you change the OpenAI response format, ensure Source Property still points to the Base64 image string.

Step 4: Configure the Output Node

Return the generated image to the form completion page.

  1. Add the Return Form Output node and connect it to Transform to Binary File.
  2. Set the Operation to completion.
  3. Set Respond With to returnBinary.
  4. Set Completion Title to Result and Completion Message to Here is the created image:.

Step 5: Test and Activate Your Workflow

Run a manual test to confirm the form, image generation, and return output work end-to-end.

  1. Click Execute Workflow and open the form from Image Prompt Intake.
  2. Submit a sample prompt and image size, then verify the execution flows from Image Prompt IntakeOpenAI Image RequestTransform to Binary FileReturn Form Output.
  3. Confirm the completion page displays the generated image and the message Here is the created image:.
  4. Toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • OpenAI credentials can expire or be linked to the wrong project. If things break, check the credential selection inside the “OpenAI Image Request” HTTP node first.
  • If you later add Telegram delivery, bot permissions matter. When messages fail, check the bot is in the right chat and can post files, not just text.
  • Default prompts are generic, honestly. Add style rules (brand colors, composition notes, “no text overlays”) early so you’re not reworking every single image.

Frequently Asked Questions

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

About 20 minutes if your OpenAI key is ready.

Do I need coding skills to automate OpenAI image requests?

No. You’ll mostly connect credentials and paste an API key. The rest is editing a couple of form fields and testing one request.

Is n8n free to use for this OpenAI Telegram 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 vary based on image size and usage.

Where can I host n8n to run this OpenAI Telegram 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 OpenAI Telegram automation workflow for brand style prompts?

Yes, and you should. Most people customize the prompt text before it’s sent in the “OpenAI Image Request” HTTP node, so every request includes your brand rules (style, background, “no text”, lighting). Common tweaks include forcing a fixed aspect ratio, adding a reusable “house style” prefix, and rejecting vague prompts by adding a simple validation check in the form step.

Why is my OpenAI connection failing in this workflow?

Usually it’s an invalid or expired API key, or the key is attached to a project without the right billing setup. Double-check the credential selected in the HTTP Request node and confirm your OpenAI account can access the image model you’re calling. If it fails only sometimes, it can also be rate limits when you run lots of requests back-to-back.

How many images can this OpenAI Telegram automation handle?

On n8n Cloud Starter, you can run a few thousand executions per month, which is plenty for most small teams generating images daily. If you self-host, there’s no execution cap, but you’re limited by your server and OpenAI rate limits. Practically, this workflow can handle steady daily usage easily, and you can queue requests if you expect spikes.

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

Often, yes. n8n is better when you want more control over the request payload, file handling, and data transformation without paying extra for multi-step logic. It’s also easier to self-host, which matters if you’re generating lots of creative assets and don’t want per-task pricing to balloon. Zapier or Make can still be fine for a simple “send prompt, get result” prototype, especially if your team already lives there. If you’re unsure, Talk to an automation expert and get a quick recommendation based on volume and tools.

Once this is in place, image requests stop feeling like tiny emergencies. You collect the right inputs, generate the asset, and get a real file back. Done.

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