Global AI Network
Agent Template v1.0

Telegram UGC Video Generator

Transform product images into viral UGC videos instantly—from Telegram to social platforms with AI-powered scripts and automated publishing.

675+
Deployments
10m
Setup Time
Free
Pricing

Need custom configuration?

Our solution engineers can help you adapt this agent to your specific infrastructure and requirements.

Enterprise Grade Best Practices Production Optimized

INTEGRATED_MODULES

Kling V2.1
Kling V2.1
OpenAI
OpenAI
Telegram
Telegram
Upload-Post
Upload-Post
Step by Step

Setup Tutorial

mission-briefing.md

TaskAGI UGC Video Generation Workflow Setup Guide

What This Agent Does

This powerful automation workflow transforms product images into complete, ready-to-publish user-generated content (UGC) videos. Simply send a product photo via Telegram, and the system automatically analyzes the product, generates a compelling video script, creates a professional video using AI, and publishes it across your social media platforms—all without manual intervention.

Key benefits and time savings:

  • 90% faster content creation: Automate the entire UGC production pipeline from image to published video
  • Consistent quality: AI-powered analysis and scripting ensures professional, on-brand content every time
  • Multi-platform distribution: Automatically publish to multiple social channels simultaneously
  • Reduced creative workload: Eliminate manual scripting, video editing, and caption writing

Target use cases:

  • E-commerce businesses needing rapid product promotion content
  • Digital marketing agencies managing multiple client campaigns
  • Influencer networks scaling content production
  • Product launch campaigns requiring quick turnaround
  • Social commerce platforms automating content generation

Who Is It For

This workflow is ideal for marketing teams, e-commerce entrepreneurs, content creators, and digital agencies who need to produce high-volume UGC content efficiently. You'll benefit most if you:

  • Manage multiple product lines requiring regular promotional content
  • Want to reduce dependency on external video production services
  • Need to maintain consistent posting schedules across social platforms
  • Prefer automation over manual content creation workflows
  • Have budget allocated for AI and video generation services

No video production experience required—the workflow handles all technical aspects automatically.


Required Integrations

Telegram

Why it's needed: Telegram serves as your primary input channel and communication hub. Users send product images through Telegram, and the system delivers completed videos and confirmation messages back through the same platform, creating a seamless user experience.

Setup steps:

  1. Create a Telegram Bot

    • Open Telegram and search for @BotFather
    • Send the command /newbot
    • Follow the prompts to name your bot (e.g., "UGC Video Generator")
    • Copy the API Token provided (format: 123456789:ABCdefGHIjklmnoPQRstuvWXYZ)
  2. Enable Webhook in TaskAGI

    • Navigate to TaskAGI's integration settings
    • Select Telegram from available integrations
    • Paste your API Token in the authentication field
    • Enable webhook mode for real-time message processing
  3. Configure the Telegram Trigger Node

    • In your workflow, locate the telegram.webhook node
    • Set trigger type to "Message with Photo"
    • This ensures the workflow only activates when images are sent
  4. Test the Connection

    • Send a test message to your bot in Telegram
    • Verify the webhook receives the message in TaskAGI logs

How to obtain API keys/credentials: Your Telegram Bot Token is provided immediately by BotFather. Store it securely and never share it publicly. You can regenerate tokens anytime through BotFather if compromised.


OpenAI

Why it's needed: OpenAI's GPT-4 and GPT-4o-mini models power three critical workflow stages: analyzing product images for key features, generating engaging video scripts, and creating social media captions. This ensures your content is compelling and conversion-focused.

Setup steps:

  1. Create an OpenAI Account

    • Visit platform.openai.com
    • Sign up or log in to your account
    • Navigate to API Keys in the left sidebar
  2. Generate Your API Key

    • Click "Create new secret key"
    • Copy the key immediately (you won't see it again)
    • Store it securely in your password manager
  3. Set Up Billing

    • Go to Billing → Overview
    • Add a payment method
    • Set usage limits to control costs (recommended: $50-100/month for testing)
  4. Configure in TaskAGI

    • Open TaskAGI integrations
    • Select OpenAI
    • Paste your API key
    • Verify the connection with a test request
  5. Configure Model Selection

    • For product analysis and script generation: use gpt-4o (most capable)
    • For social captions: use gpt-4o-mini (faster, cost-effective)
    • These are pre-configured in the workflow nodes

How to obtain API keys/credentials: OpenAI API keys are generated in your account dashboard. Free trial credits are available for new accounts (typically $5-18 worth). Production use requires a paid account with valid payment method.


Kling AI (klingv21)

Why it's needed: Kling generates professional, high-quality videos from text prompts. This transforms your AI-written scripts into visually compelling videos that engage viewers and drive conversions.

Setup steps:

  1. Register with Kling AI

    • Visit the Kling AI platform (klingai.com or through TaskAGI marketplace)
    • Create an account with email or social login
    • Verify your email address
  2. Access API Credentials

    • Navigate to Developer Settings or API Console
    • Create a new API application
    • Copy your API Key and Secret Key
  3. Configure in TaskAGI

    • Go to TaskAGI integrations
    • Select Kling AI (klingv21)
    • Enter your API Key and Secret Key
    • Test the connection
  4. Set Video Parameters

    • Default resolution: 1080p (recommended for social media)
    • Duration: 15-30 seconds (optimal for social platforms)
    • Aspect ratio: 9:16 (vertical, ideal for TikTok/Instagram Reels)

How to obtain API keys/credentials: Kling provides API credentials through their developer dashboard. Most plans include monthly video generation credits. Check your plan limits to ensure sufficient quota for your expected volume.


UploadPost

Why it's needed: UploadPost handles multi-platform distribution, automatically publishing your generated videos to TikTok, Instagram, YouTube Shorts, and other social platforms simultaneously. This eliminates manual uploading and scheduling.

Setup steps:

  1. Create an UploadPost Account

    • Visit uploadpost.com
    • Sign up with email or social account
    • Complete profile setup
  2. Connect Social Media Accounts

    • In UploadPost settings, select Connected Accounts
    • Authorize each platform (TikTok, Instagram, YouTube, etc.)
    • Grant necessary permissions for video uploads
    • Verify each connection is active
  3. Configure in TaskAGI

    • Open TaskAGI integrations
    • Select UploadPost
    • Authenticate with your UploadPost account
    • Select which platforms to publish to by default
  4. Set Publishing Preferences

    • Choose auto-publish (immediate) or schedule (specific time)
    • Set hashtag templates for consistency
    • Configure watermark preferences if desired

How to obtain API keys/credentials: UploadPost generates API credentials in your account dashboard under Developer Settings. You'll need active, authorized social media accounts to publish successfully.


Configuration Steps

Node-by-Node Configuration Guidance

Node 1: Workflow Overview (core.workflow_note)

  • This is documentation only—no configuration needed
  • Serves as a reference point for workflow purpose

Node 2: Telegram Trigger (telegram.webhook)

  • Trigger Type: Message with Photo
  • Expected Input: Photo file from Telegram user
  • Output: Photo data + message text (if included)
  • No additional configuration required once Telegram integration is authenticated

Node 3: Extract Photo and Text (core.edit_data)

  • Purpose: Separate the photo file from any accompanying text
  • Configuration:
    • Extract field: photo
    • Extract field: caption (optional user notes)
  • Output: Clean photo data for next steps

Node 4: Get Photo from Telegram (telegram.getFile)

  • Purpose: Retrieve the actual photo file from Telegram servers
  • Input: Photo ID from Node 3
  • Configuration:
    • File ID: {{nodes.3.photo_id}}
  • Output: Photo file URL and binary data

Node 5: Upload to Public URL (core.http_request)

  • Purpose: Upload the photo to a temporary public server for AI analysis
  • Configuration:
    • Method: POST
    • URL: Your file hosting endpoint (e.g., AWS S3, Cloudinary, or TaskAGI's built-in storage)
    • Headers: Content-Type: image/jpeg
    • Body: Photo binary data from Node 4
  • Expected Response: Public URL to access the photo

Node 6: Extract Public URL (core.function)

  • Purpose: Parse the response and extract the usable public URL
  • Configuration:
    • Function: Extract url field from HTTP response
    • Output variable: public_photo_url
  • Example Output: https://storage.example.com/photos/abc123.jpg

Node 7: Analyze Product Image (openai.createCompletion)

  • Purpose: Use GPT-4o to analyze the product and extract key features
  • Configuration:
    • Model: gpt-4o
    • Prompt: "Analyze this product image and extract: 1) Product name, 2) Key features (3-5 bullet points), 3) Target audience, 4) Unique selling points. Image URL: {{nodes.6.public_photo_url}}"
    • Temperature: 0.7 (balanced creativity and accuracy)
    • Max tokens: 500
  • Output: Structured product analysis used in script generation

Node 8: Generate UGC Video Script (openai.createCompletion)

  • Purpose: Create a compelling, conversion-focused video script
  • Configuration:
    • Model: gpt-4o
    • Prompt: "You are a UGC video script writer. Create a compelling 30-second video script for this product: {{nodes.7.analysis}}. Include: 1) Hook (first 3 seconds), 2) Problem statement, 3) Solution (product benefits), 4) Call-to-action. Write naturally, as if speaking directly to the camera."
    • Temperature: 0.8 (more creative)
    • Max tokens: 400
  • Output: Ready-to-use video script

Node 9: Generate Video with Kling (klingv21.generateVideo)

  • Purpose: Convert the script into a professional video
  • Configuration:
    • Prompt: {{nodes.8.script}}
    • Resolution: 1080p
    • Duration: 30 seconds
    • Aspect ratio: 9:16 (vertical)
    • Style: Professional or Casual (choose based on brand)
  • Expected Processing Time: 2-5 minutes
  • Output: Video file URL

Node 10: Send Video to Telegram (telegram.sendVideo)

  • Purpose: Deliver the generated video to the user for review
  • Configuration:
    • Chat ID: {{nodes.2.chat_id}}
    • Video URL: {{nodes.9.video_url}}
    • Caption: "Your UGC video is ready! Review and approve for publishing."
  • Output: Confirmation that video was sent

Node 11: Generate Social Caption (openai.createCompletion)

  • Purpose: Create platform-optimized captions
  • Configuration:
    • Model: gpt-4o-mini (cost-effective for simple task)
    • Prompt: "Create an engaging social media caption (150 characters max) for a UGC video about this product: {{nodes.7.analysis}}. Include relevant emojis and a call-to-action. Format for TikTok/Instagram."
    • Temperature: 0.7
    • Max tokens: 150
  • Output: Ready-to-use social caption

Node 12: Publish to Social Platforms (uploadpost.uploadVideo)

  • Purpose: Automatically distribute video across multiple platforms
  • Configuration:
    • Video URL: {{nodes.9.video_url}}
    • Caption: {{nodes.11.caption}}
    • Platforms: Select TikTok, Instagram Reels, YouTube Shorts (or your preferred channels)
    • Publish timing: Immediate or schedule for optimal engagement times
    • Hashtags: #UGC #ProductReview #FYP #ForYou (customize per brand)
  • Output: Publication confirmation with platform-specific URLs

Node 13: Send Confirmation (telegram.sendMessage)

  • Purpose: Notify user that entire workflow completed successfully
  • Configuration:
    • Chat ID: {{nodes.2.chat_id}}
    • Message: "✅ Your UGC video has been generated and published to {{nodes.12.platforms}}! View it here: {{nodes.12.urls}}"
  • Output: Confirmation message delivered to user

Testing Your Agent

Step 1: Pre-Launch Verification

Before running your first production workflow, verify all integrations:

  1. Test Telegram Connection

    • Send a test message with an image to your bot
    • Check TaskAGI logs for webhook receipt
    • Verify the message appears in workflow execution history
  2. Test OpenAI Integration

    • Run a simple test prompt through the OpenAI node
    • Confirm API key is valid and has available credits
    • Check response quality and token usage
  3. Test Kling Video Generation

    • Submit a test prompt to Kling
    • Monitor video generation progress
    • Verify output video quality and format
  4. Test UploadPost Distribution

    • Manually upload a test video through UploadPost
    • Verify all connected social accounts are active
    • Confirm video appears on each platform

Step 2: Execute Test Workflow

  1. Prepare a Test Product Image

    • Use a clear, well-lit product photo
    • Ensure image is under 10MB
    • Recommended: 1080x1080px or larger
  2. Send Test Image to Telegram Bot

    • Open your Telegram bot chat
    • Send the test product image
    • Note the timestamp for reference
  3. Monitor Execution in Real-Time

    • Open TaskAGI workflow execution dashboard
    • Watch each node complete in sequence
    • Check logs for any errors or warnings
    • Expected total execution time: 5-10 minutes

Step 3: Verify Each Processing Stage

Stage What to Check Success Indicator
Image Upload Photo received and stored Public URL generated in Node 6
Product Analysis AI correctly identifies product Analysis includes name, features, audience
Script Generation Script is engaging and natural Script reads well when spoken aloud
Video Creation Kling generates video successfully Video file exists and plays without errors
Social Publishing Video distributed to platforms Video appears on TikTok, Instagram, YouTube within 5 minutes
User Notification Confirmation message sent User receives Telegram message with video links

Step 4: Expected Results and Success Indicators

Successful workflow execution shows:

Telegram: User receives video preview message within 5 minutes
Video Quality: Generated video is 1080p, 30 seconds, vertical format
Script Quality: Video script is natural, persuasive, and product-focused
Caption Quality: Social caption includes emojis, CTA, and is under 150 characters
Multi-Platform Publishing: Video appears on all selected platforms within 10 minutes
No Errors: Execution logs show zero failures or warnings

Common issues and solutions:

Issue Cause Solution
Telegram webhook not receiving messages Bot not properly configured Verify bot token and webhook URL in TaskAGI settings
OpenAI API errors Insufficient credits or rate limiting Check billing account and add payment method
Kling video generation timeout Video generation taking too long Increase timeout setting to 10 minutes
UploadPost not publishing Social accounts not properly authorized Re-authenticate accounts in UploadPost settings
Poor video quality Low-
Similar Solutions

Related Agents

Explore these powerful automation agents that complement your workflow.

Telegram Expense Tracker AI Agent

Telegram Expense Tracker AI Agent

Automate expense tracking via Telegram with AI-powered voice transcription, OCR receipt scanning, and intelligent expens...

Telegram News Article RAG Chat Bot

Telegram News Article RAG Chat Bot

Automate news analysis and intelligent Q&A with Pinecone vector search—instantly summarize articles from Telegram links...

Telegram UGC Product Ad Video Generator

Telegram UGC Product Ad Video Generator

Transform product images into professional UGC video ads instantly. Receive images via Telegram, generate AI scripts wit...