OpenAI to Telegram, image requests delivered clean
Your image requests are probably scattered across Slack threads, DMs, and half-filled briefs. Then the “final” file shows up with no context, no link, and no easy way to approve it.
This OpenAI Telegram images automation hits marketers first, honestly. But design leads and agency owners feel it too when approvals drag and assets get lost in chat history.
You’ll set up one intake form that routes requests to OpenAI, uploads the result, and delivers a clean Telegram message with the image plus share links. You’ll also learn what to tweak so it matches your workflow, not the other way around.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: OpenAI to Telegram, image requests delivered clean
flowchart LR
subgraph sg0["On form submission Flow"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Set Access Permissions", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Edit Image (OpenAI)"]
n2@{ icon: "mdi:cog", form: "rounded", label: "Convert json binary to File", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Convert json binary to File ..", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>On form submission"]
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Upload Result Image to imgbb"]
n6@{ icon: "mdi:cog", form: "rounded", label: "Upload Result Image to Googl..", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "File Link", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Input Image by URL"]
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "SETUP API KEY", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Image Generation"]
n11@{ icon: "mdi:swap-vertical", form: "rounded", label: "File Link1", pos: "b", h: 48 }
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Send to Telegram"]
n13@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch Mode", pos: "b", h: 48 }
n7 --> n12
n11 --> n12
n13 --> n1
n13 --> n8
n13 --> n10
n9 --> n5
n10 --> n2
n4 --> n13
n1 --> n3
n8 --> n1
n0 --> n7
n2 --> n9
n5 --> n11
n3 --> n6
n6 --> n0
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n4 trigger
class n13 decision
class n1,n5,n8,n10 api
classDef customIcon fill:none,stroke:none
class n1,n4,n5,n8,n10,n12 customIcon
Why This Matters: Image Requests Turn Into Chaos
Image production breaks down in the small moments. Someone asks for “a quick hero graphic,” you reply with questions, they answer with a screenshot, and then you’re hunting for the right file again two days later. If you work with contractors or clients, it’s worse: you end up forwarding messages, re-explaining context, and trying to reconcile which version is the “approved” one. The time loss isn’t just the creating. It’s the coordination, the waiting, and the rework.
The friction compounds. Here’s where it usually breaks down.
- Requests arrive without consistent fields, so you spend 10 minutes just clarifying what “make it pop” means.
- Edits get buried in chat history, which leads to wrong versions being used in ads or landing pages.
- Files are shared as attachments with no permanent link, so approvals turn into “can you resend that?” loops.
- Manual uploading to storage happens at the end (if it happens at all), so you can’t reliably find assets later.
What You’ll Build: A One-Form Image Pipeline to Telegram
This workflow gives you a simple front door for image work: a secure form where someone submits a prompt, chooses how they want to generate or edit, and optionally provides an existing image (upload) or an image URL. Once submitted, n8n automatically routes the request to the right OpenAI call. If it’s a brand-new image, OpenAI generates it from scratch. If it’s an edit, the workflow fetches the source image (from upload or URL) and applies the requested changes. Then it converts the result into a real file, uploads it to cloud storage, creates shareable links, and sends everything to Telegram in a clean, readable message with the finished image attached.
The workflow starts with a form submission. After routing (text-only, upload edit, or URL edit), OpenAI processes the image and n8n handles the boring parts: file conversion, hosting, and delivery to Telegram with links you can actually reuse.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say your team requests 10 visuals a week and each one takes about 15 minutes of coordination: clarifying the brief, finding the source image, uploading the result, then pasting links. That’s roughly 2.5 hours weekly before the actual creative work even counts. With this workflow, the requester submits one form (about 2 minutes), OpenAI generates/edits, and Telegram receives the finished image with share links. You still review and approve, but the “where is it?” time mostly disappears.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- OpenAI API for image generation and edits
- Telegram Bot to deliver images and links
- Google Drive to store files and create share links
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Beginner. You’ll connect accounts, paste API keys, and adjust a few fields like chat ID and Drive folder.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A secure form submission triggers everything. Someone enters a prompt, selects a mode (generate or edit), and optionally uploads an image or pastes an image URL. This is the part that fixes the “random DM brief” problem.
The workflow routes the request based on input type. A switch node checks what you provided and sends it down the right path: text-to-image uses the “create” call, while edits use the “edit” call (with a fetched image if you gave a URL).
OpenAI generates the output, and n8n turns it into a proper file. The OpenAI response is converted into a PNG binary so you can upload it like any normal asset. No copying base64 blobs, no weird manual download steps.
Upload + links + Telegram delivery happen automatically. The file is uploaded to Google Drive, sharing permissions are applied, and the workflow assembles view/download links. Telegram then receives the image plus a clean message containing the prompt and URLs.
You can easily modify the storage destination (Drive vs ImgBB) to match how your team prefers to share assets. 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 prompt text, quality, and optional image inputs for the pipeline.
- Add the Form Intake Trigger node and set Form Title to
GPT image to image. - Under Form Fields, add the fields: Promt (required), quality dropdown with options
low,medium,high, input image file (accept.png,.jpg,.jpeg), and input image url. - Set Response Mode to
lastNodeand Authentication tobasicAuth. - Credential Required: Connect your httpBasicAuth credentials in Form Intake Trigger.
Tip: Keep the Promt field required to avoid empty OpenAI requests.
Step 2: Add Routing for Image Input Types
Use a switch to route between image file, image URL, or prompt-only generation.
- Add Route Input Choice and configure rules for
fileandfile_urloutputs. - For the first rule, set the condition to
{{ $json['input image'] !== null && $json['input image url'].isNotEmpty() }}. - For the second rule, set the condition to
{{ $json['input image url'] !== null && $json['input image url'].isNotEmpty() }}. - Keep Fallback Output set to
extrato route prompt-only requests to image generation.
⚠️ Common Pitfall: If both file and URL are empty, requests fall back to the prompt-only path—ensure your form guidance makes this clear.
Step 3: Set Up OpenAI Image Generation and Editing
Configure OpenAI calls to generate new images or edit existing ones based on the routing rules.
- In OpenAI Image Create, set URL to
https://api.openai.com/v1/images/generationsand Method toPOST. - In the body parameters of OpenAI Image Create, set model to
gpt-image-1, prompt to{{ $json.Promt }}, n to{{Number(1)}}, size to1024x1024, and quality to{{ $json.quality }}. - Credential Required: Connect your openAiApi credentials in OpenAI Image Create.
- In Fetch Image via URL, set URL to
{{ $json['input image url'] }}so the binary can be passed to editing. - In OpenAI Image Edit Call, set URL to
https://api.openai.com/v1/images/editsand ensure the image field uses{{ $json["input image url"].isEmpty()?"input_image":"data"}}. - Set prompt to
{{ $json.Promt }}, size to1024x1024, and quality to{{ $json.quality }}in OpenAI Image Edit Call. - Credential Required: Connect your openAiApi credentials in OpenAI Image Edit Call.
Step 4: Convert Images and Upload to Storage Services
Convert OpenAI responses to PNG binaries, store them in Drive, and generate public links.
- In Make PNG Binary and Build PNG File, set Operation to
toBinaryand Source Property todata[0].b64_json. - Set File Name in both nodes to
{{ $now.format('yyyy-MM-dd_HHmmss')+".png" }}and Mime Type toimage/png. - In Upload to Drive, set Name to
{{ $input.item.binary.data.fileName }}and keep Folder set to/ (Root folder). - Credential Required: Connect your googleApi credentials in Upload to Drive.
- In Apply Share Permissions, keep Operation set to
shareand Role toreaderwith Type asanyone. - Credential Required: Connect your googleApi credentials in Apply Share Permissions.
- In Assemble File Links, map ViewLink to
{{ $('Upload to Drive').item.json.webViewLink }}and ContentLink to{{ $('Upload to Drive').item.json.webContentLink }}.
Step 5: Configure Image Hosting for Direct URL Delivery
Upload generated images to imgbb for direct-access URLs and assemble output links.
- In Insert API Key, set IMGBB_API_KEY to your key value (replace
[CONFIGURE_YOUR_API_KEY]). - In Upload to imgbb, set URL to
https://api.imgbb.com/1/uploadand ensure the body includes image from binary fielddataand key as{{ $json.IMGBB_API_KEY }}. - In Assemble Image URLs, map ViewLink to
{{ $json.data.url }}and ContentLink to{{ $json.data.image.url }}.
⚠️ Common Pitfall: If the imgbb key is missing or invalid, Upload to imgbb will fail and no links will reach the dispatch step.
Step 6: Configure the Delivery Output
Send the final image to Telegram with a caption containing the prompt, quality, and links.
- In Telegram Photo Dispatch, set Operation to
sendPhotoand File to{{ $json.ContentLink }}. - Set Chat ID to your Telegram ID, replacing
[YOUR_ID]. - Set Caption to
{{ $('Form Intake Trigger').item.json.Promt }} {{ $('Form Intake Trigger').item.json.quality }} [Result]({{ $json.ViewLink }})and Parse Mode toMarkdownV2. - Credential Required: Connect your telegramApi credentials in Telegram Photo Dispatch.
Step 7: Test and Activate Your Workflow
Validate the pipeline end-to-end and then activate it for production use.
- Click Execute Workflow and submit the form from Form Intake Trigger with a prompt and either a file or URL.
- Confirm a successful run shows either Assemble File Links or Assemble Image URLs feeding into Telegram Photo Dispatch.
- Verify the Telegram message includes the image and links and that the Drive links from Apply Share Permissions are publicly accessible.
- Toggle the workflow to Active to enable production use.
Troubleshooting Tips
- Google Drive permissions can be the silent killer. If links work for you but not others, check the “Apply Share Permissions” step and confirm the Drive connection has access to the target folder.
- If you’re using the URL-based edit path, the HTTP Request that fetches the image can fail on blocked URLs or redirects. Try a direct image file URL (ending in .png or .jpg) and confirm the source server allows downloads.
- OpenAI calls can return errors when the input image format is off or the prompt is too vague. Keep uploads to PNG/JPG, and add a little structure to prompts (brand colors, style, text rules) so you’re not re-running jobs all day.
Quick Answers
About 30 minutes if your OpenAI, Telegram, and Drive accounts are ready.
No coding required. You’ll mostly paste API keys, choose a Drive folder, and set the Telegram chat where results should land.
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 quality.
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.
Yes, and you probably should. You can keep Telegram delivery but swap storage by changing the “Upload to Drive” and “Apply Share Permissions” steps, or lean on “Upload to imgbb” if you want instant public URLs. Common tweaks include adding your brand rules to the prompt, forcing specific sizes (like 1024×1024), and adding extra fields in the form (campaign name, client, due date) so messages are easier to scan later.
Usually it’s the bot token or chat ID. Regenerate the Telegram bot token if needed, confirm the bot is actually in the chat, and make sure it has permission to post media. If it works for text but not photos, check file size and verify the workflow is sending a real binary file (after the PNG conversion step), not a link pretending to be an attachment.
On a typical n8n Cloud plan, you can run thousands of requests a month, and self-hosting removes execution limits (your server becomes the constraint). The real bottleneck is usually OpenAI processing time plus uploads to Drive, so if you’re doing big batches, queue them and avoid firing 50 image jobs at once.
Often, yes, because this workflow needs branching logic (text vs upload vs URL), file conversion, and more control over API calls than most “two-step” zaps. n8n also gives you a self-host option, which can matter when volume grows and per-task pricing starts to sting. Zapier and Make can still work if you keep the flow very simple, but you’ll usually end up bolting on extra steps for file handling and formatting. If you’re unsure, map your exact use case first. Talk to an automation expert and we’ll sanity-check the best approach.
Once this is running, image requests stop being a scavenger hunt. The workflow handles intake, generation, storage, and clean delivery so you can focus on the creative decisions and approvals.
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.