🔓 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 + OpenAI: UGC videos delivered back fast

Lisa Granqvist Partner Workflow Automation Expert

You know the loop. Someone drops a “quick UGC idea” in chat, you ask for a photo, you ask for a script, you ask for a hook, then you wait on edits and exports. Meanwhile the campaign is sitting there with nothing new to test.

This Telegram UGC automation hits performance marketers first, but ecommerce founders and agency leads feel it too. The outcome is simple: you send a product photo and a short brief, and you get a UGC-style ad video back in Telegram without the back-and-forth.

Below you’ll see how the workflow runs, what it replaces day-to-day, and what you can customize if you want longer videos, different models, or a tracking sheet.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Telegram + OpenAI: UGC videos delivered back fast

The Problem: UGC video production is a bottleneck

UGC-style ads look “casual,” but producing them is anything but. You still need a product angle, a believable scene plan, a few short clips that don’t feel too polished, and a final merge that actually matches the brief. When you do it manually, the work splinters across DMs, folders, editing tools, and “can you resend that file” moments. It’s not just time. It’s the mental load of keeping versions straight, plus the opportunity cost of not testing new hooks this week because production got stuck.

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

  • You spend about an hour per variant just coordinating inputs, fixes, and exports.
  • Briefs get interpreted differently across creators, so you end up rewriting the same “style rules” every time.
  • Clip length and pacing are inconsistent, which means extra edits before you can even run a clean test.
  • When you need five new concepts, production doesn’t scale; it just turns into more waiting.

The Solution: Telegram in, UGC ad video out

This workflow turns Telegram into a simple “creative intake” channel. You message your bot with one compressed image (product, and optionally a character) plus a short instruction like “make a 20-second UGC ad.” n8n grabs that image from Telegram, then OpenAI analyzes what’s in it so the prompts stay grounded in the actual product details. From there, an AI agent generates a realistic, UGC-style image prompt (think iPhone photo vibes), creates the image via an external model, then plans scenes and dialogue for short video clips. Those clips are generated, checked until ready, collected, and stitched into one continuous video. Finally, the finished download link is delivered back to your Telegram chat.

The workflow starts with a Telegram message and a file fetch. Then OpenAI handles analysis plus structured scene planning, while HTTP requests create images, generate clips, and merge them. At the end, you get a single UGC-style video back in the same place you requested it.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you want 5 new UGC ad variants for a product this week. Manually, a “simple” loop (briefing, finding/refining hooks, getting 3 short clips, stitching, exporting, and sending) can easily run about 2 hours per variant, so you lose a full day. With this workflow, you drop a photo and a sentence into Telegram in about 2 minutes, then wait for the AI generation and merge (often around 20 minutes). You still review the output, but you’re no longer doing the busywork. That’s roughly 8–10 hours back in a week.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram to collect photos and briefs.
  • OpenAI for image analysis and scene planning.
  • Key.AI / File.AI endpoints (get the API key from your provider dashboard)

Skill level: Intermediate. You’ll connect credentials, paste API keys, and adjust a couple of prompts without breaking the flow.

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

How It Works

A Telegram message kicks things off. You send one compressed image plus a short instruction (length, vibe, angle). The bot receives it and n8n grabs the file behind the scenes.

The workflow extracts what matters from the image. OpenAI analyzes the photo and turns it into structured details, so the prompts stay consistent and don’t “hallucinate” basic product attributes.

AI plans the UGC story, then generates the assets. An image prompt is created first, then an image is generated and checked until it’s ready. Next, the workflow builds a scene plan (dialogue, setting, pacing), splits it into short clips (often around 8 seconds each), and generates each clip via HTTP requests while n8n waits and re-checks status.

The clips are merged and delivered back to you. Once all URLs are collected, the workflow sends them to an FFmpeg merge service and polls until the final video is available. Then it posts the finished video link back to Telegram, ready for review and testing.

You can easily modify the clip length and model choice to match your testing cadence. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Telegram Trigger

This workflow starts when a user sends a Telegram message with a photo and caption.

  1. Add the Incoming Telegram node and keep Updates set to message.
  2. Credential Required: Connect your telegramApi credentials in Incoming Telegram.

Step 2: Connect Telegram Bot Token and Fetch the Image File

The next nodes fetch the image file path from Telegram using your bot token.

  1. In Assign Bot Token, set the field bot id to your Telegram bot token value, replacing [CONFIGURE_YOUR_TOKEN].
  2. In Retrieve File Path, set URL to =https://api.telegram.org/bot{{ $('Assign Bot Token').item.json['bot id'] }}/getFile?file_id={{ $('Incoming Telegram').first(0,0).json.message.photo[2].file_id }}.
  3. Confirm that Assign Bot Token connects to Retrieve File Path, and Retrieve File Path connects to Analyze Image.

⚠️ Common Pitfall: If you leave [CONFIGURE_YOUR_TOKEN] in Assign Bot Token, Telegram file retrieval will fail. Replace it with the real bot token.

Step 3: Set Up AI Analysis and Prompt Agents

This section analyzes the uploaded image and produces structured prompts for image and video generation.

  1. In Analyze Image, keep Resource set to image, Operation to analyze, and Image URLs set to =https://api.telegram.org/file/bot{{ $('Assign Bot Token').item.json['bot id'] }}/{{ $json.result.file_path }}.
  2. Credential Required: Connect your openAiApi credentials in Analyze Image.
  3. In Notify Progress, set Text to Got it! I'm now creating your video... and Chat ID to ={{ $('Incoming Telegram').first().json.message.chat.id }}.
  4. Credential Required: Connect your telegramApi credentials in Notify Progress.
  5. In Image Prompt Agent, keep the Text field as provided and ensure Has Output Parser is enabled.
  6. In Video Prompt Agent, keep the Text field as provided and ensure Has Output Parser is enabled.
  7. Confirm that Chat Model is connected as the language model to Image Prompt Agent and Video Prompt Agent, and that Reasoning Tool is connected as their tool.

Credential Required: Connect your openAiApi credentials in Chat Model. The AI sub-nodes Reasoning Tool, Image Output Parser, and Scene Output Parser inherit credentials from the parent agents, so add credentials on Chat Model rather than the sub-nodes.

Step 4: Generate the Image and Poll for Readiness

These nodes generate the image from the prompt and wait until the image is ready.

  1. In Generate Image, set URL to https://api.kie.ai/api/v1/gpt4o-image/generate and keep the JSON Body as defined with filesUrl, prompt, and size expressions.
  2. Credential Required: Connect your httpHeaderAuth credentials in Generate Image.
  3. In Delay Image Check, set Amount to 60 seconds.
  4. In Fetch Image Status, set URL to =https://api.kie.ai/api/v1/gpt4o-image/record-info and pass taskId as ={{ $('Generate Image').first().json.data.taskId }}.
  5. Credential Required: Connect your httpHeaderAuth credentials in Fetch Image Status.
  6. In Clip Ready?, keep the condition checking ={{ $json.data.successFlag }} equals 1 to loop until ready.

⚠️ Common Pitfall: The image polling loop relies on Clip Ready? routing back to Delay Image Check when not ready. Ensure the false branch is connected correctly to avoid workflow stalls.

Step 5: Generate Video Clips, Merge, and Retrieve Final Video

After the image is ready, the workflow generates clips per scene, aggregates them, and merges into a final video.

  1. In Separate Scenes, set Field to Split Out to output.scenes to iterate through each generated scene.
  2. In Generate Clip, set URL to https://api.kie.ai/api/v1/veo/generate and keep the Body expressions that use {{ $('Separate Scenes').item.json.video_prompt }}, {{ $('Separate Scenes').item.json.model }}, {{ $('Separate Scenes').item.json.aspect_ratio_video }}, and the image URL from Fetch Image Status.
  3. Credential Required: Connect your httpHeaderAuth credentials in Generate Clip.
  4. In Delay Clip Check, set Amount to 120 seconds, then configure Fetch Clip Status with URL =https://api.kie.ai/api/v1/veo/record-info and taskId ={{ $('Generate Clip').item.json.data.taskId }}.
  5. Credential Required: Connect your httpHeaderAuth credentials in Fetch Clip Status and Merge Video Clips, Retrieve Final Video.
  6. In Clip Status Check, keep the condition ={{ $json.data.successFlag }} equals 1 to continue or loop back to Delay Clip Check.
  7. In Collect Clip URLs, keep the aggregation on data.response.resultUrls[0], then send to Merge Video Clips with JSON Body set to ={ "video_urls": [{{ $json.resultUrls[0].map(url => `"${url}"`) }}] }.
  8. In Pause Before Fetch, set Amount to 100 seconds, then use Retrieve Final Video with URL ={{ $('Merge Video Clips').first().json.response_url }}.
  9. In Video Available?, keep the condition ={{ $json.video.url }} is not empty to decide whether to deliver or loop.

Credential Required: Connect your httpHeaderAuth credentials across all HTTP generation nodes. This workflow uses 7+ HTTP nodes for image and video generation; ensure the same auth headers are configured in each.

Step 6: Configure Output Delivery to Telegram

Once the final video is ready, it is delivered back to the user in Telegram.

  1. In Deliver Video, set Operation to sendVideo and File to ={{ $json.video.url }}.
  2. Set Chat ID to ={{ $('Incoming Telegram').first().json.message.chat.id }}.
  3. Credential Required: Connect your telegramApi credentials in Deliver Video.

Step 7: Test and Activate Your Workflow

Validate the complete flow from Telegram input to video delivery.

  1. Click Execute Workflow and send a Telegram message with a photo and caption to your bot.
  2. Verify the run: Incoming Telegram triggers, Notify Progress sends the acknowledgement message, and the image/video generation loop nodes progress without errors.
  3. Confirm a successful run when Deliver Video sends a video file back to the same Telegram chat.
  4. When satisfied, toggle the workflow to Active to enable production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Telegram bot credentials can be surprisingly fragile. If delivery fails, check the Bot Token in n8n first and confirm the bot still has permission to message your chat.
  • 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 UGC automation automation?

About 30–60 minutes if your API keys are ready.

Do I need coding skills to automate Telegram UGC automation?

No. You’ll mostly connect accounts and paste API keys into n8n. The only “technical” part is adjusting prompts without overcomplicating them.

Is n8n free to use for this Telegram UGC 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 usage plus your image/video generation provider costs (video clips are often around $0.40 each on fast models).

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 UGC automation workflow for a longer video or different style?

Yes, and it’s the main reason this workflow is useful. You can change the requested duration in your Telegram message, and the “Video Prompt Agent” will adjust how many clips get generated. If you want a different look, tweak the “Image Prompt Agent” so it bakes in your brand style rules (lighting, background, framing, creator vibe). Many teams also swap the clip model between “Fast” and “Quality” depending on whether they’re testing or scaling winners.

Why is my Telegram connection failing in this workflow?

Usually it’s an invalid or rotated bot token, so n8n is triggering but can’t fetch files or send the final message. Re-check the bot token in your credential setup and confirm the chat ID is correct. Also watch for Telegram file retrieval issues: if the workflow can’t resolve the file path, everything downstream will look “broken” even though the AI steps are fine.

How many videos can this Telegram UGC automation automation handle?

If you self-host n8n, there’s no fixed execution limit; it mostly depends on your server and the external rendering queues.

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

For UGC video generation, n8n is usually a better fit because you need branching (the If checks), waiting/polling for external jobs, and a bit of data shaping between calls. Zapier and Make can do parts of it, but frankly they get clunky once you’re generating multiple clips and merging them. n8n also gives you the option to self-host, which matters when you start running lots of creative variants. If you only want a simple “Telegram message to Google Drive upload,” those tools can be fine. For this specific workflow’s logic, n8n is the calmer choice. Talk to an automation expert if you want a quick recommendation.

The workflow handles the repetitive production loop so you can focus on angles, offers, and testing. Set it up once, then ship more variants without the constant chasing.

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