Extend and merge UGC viral videos using Kling 2.1, then publish on social media
This workflow automates the full pipeline for extending short Viral UGC-style videos using AI, merging them, and finally publishing the output to cloud storage or social media platforms (TikTok, Instagram, Facebook, Linkedin, X, and YouTube). It integrates multiple external APIs (Fal.ai, Runpod/Kling 2.1, Postiz, Upload-Post, Google Sheets, Google Drive) to create a smooth end-to-end video-generation system.
Key Advantages
- ✅ Full End-to-End Automation
The workflow covers the entire process:
Read inputs Generate extended clips Merge them Save outputs Publish on social platforms
No manual intervention required after starting the workflow.
- ✅ AI-Powered Video Extension (Kling 2.1 or other models like Veo 3.1 or Sora 2)
The system uses Kling 2.1 (Kling 2.1 or other models like Veo 3.1 or Sora 2) to extend short videos realistically, enabling:
Longer UGC clips Consistent cinematic style Smooth transitions based on extracted frames
Ideal for viral social media content.
- ✅ Smart Integration with Google Sheets
The spreadsheet becomes a control panel:
Add new videos to extend Control merging Automatically store URLs and results
This makes the system user-friendly even for non-technical operators.
- ✅ Robust Asynchronous Job Handling
Every external API includes:
Status checks Waiting loops Error prevention steps
This ensures reliability when working with long-running AI processes.
- ✅ Automatic Merging and Publishing
Once videos are generated, the workflow:
Merges them in the correct order Uploads them to Google Drive Posts them automatically to selected social platforms
This drastically reduces time required for content production and distribution.
- ✅ Highly Scalable and Customizable
Because it is built in n8n:
You can add more APIs You can add editing steps You can connect custom triggers (e.g., Airtable, webhooks, Shopify, etc.) You can fully automate your video-production pipeline
How It Works This workflow automates the process of extending and merging videos using AI-generated content, then publishing the final result to social media platforms. The process consists of five main stages:
Data Input & Frame Extraction**
The workflow starts by reading video and prompt data from a Google Sheet. It extracts the last frame from the input video using Fal.ai’s FFmpeg API.
AI Video Generation**
The extracted frame is sent to RunPod’s Kling 2.1 AI model to generate a new video clip based on the provided prompt and desired duration.
Video Merging**
Once the AI-generated clip is ready, it is merged with the original video using Fal.ai’s FFmpeg merge functionality to create a seamless extended video.
Storage & Publishing**
The final merged video is uploaded to Google Drive and simultaneously distributed to social media platforms via:
YouTube (via Upload-Post)
TikTok, Instagram, Facebook, X, and YouTube (via Postiz)
Progress Tracking**
Throughout the process, the Google Sheet is updated with the status, video URLs, and completion markers to keep track of each step.
Set Up Steps To configure this workflow, follow these steps:
Prepare the Google Sheet
Use the provided template or clone this sheet.
Fill in the START (video URL), PROMPT (AI prompt), and DURATION (in seconds) columns.
Configure Fal.ai API for Frame Extraction & Merging
Create an account at fal.ai.
Obtain your API key.
In the nodes “Extract last frame”, “Merge Videos”, and related status nodes, set up HTTP Header Authentication with:
Name: Authorization
Value: Key YOUR_API_KEY
Set Up RunPod API for AI Video Generation
Sign up at RunPod and get your API key.
In the “Generate clip” node, configure HTTP Bearer Authentication with:
Value: Bearer YOUR_RUNPOD_API_KEY
Configure Social Media Publishing
For YouTube:
Create a free account at Upload-Post and set your YOUR_USERNAME and TITLE in the “Upload to Youtube” node.
For Multi-Platform Posting:
Sign up at Postiz and configure your Channel_ID and TITLE in the “Upload to Social” node.
Connect Google Services
Set up Google Sheets and Google Drive OAuth2 credentials in their respective nodes to allow reading from and writing to the sheet and uploading videos to Drive.
Execute the Workflow
Once all credentials are set, trigger the workflow manually via the “When clicking ‘Execute workflow’” node.
The process will run autonomously, updating the sheet and publishing the final video upon completion.
👉 Subscribe to my new YouTube channel. Here I’ll share videos and Shorts with practical tutorials and FREE templates for n8n.
Need help customizing?
Contact me for consulting and support or add me on Linkedin.
Related Templates
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Instagram Full Profile Scraper with Apify and Google Sheets
📸 Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Compare Lists and Identify Common Items & Differences Using Custom Keys
This workflow compares two lists of objects (List A and List B) using a user-specified key (e.g. email, id, domain) and ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments