Skip to main content

Extend and merge UGC viral videos using Kling 2.1, then publish on social media

Workflow preview

Workflow preview
100%
Extend and merge UGC viral videos using Kling 2.1, then publish on social media preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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, I...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.googlesheets, n8n-nodes-base.wait, n8n-nodes-base.set, n8n-nodes-base.googledrive, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Extend and merge UGC viral videos using Kling 2.1, then publish on social media
Workflow name
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

1. ✅ Full End-to-End Automation

The workflow covers the entire process:

  1. Read inputs
  2. Generate extended clips
  3. Merge them
  4. Save outputs
  5. Publish on social platforms

No manual intervention required after starting the workflow.

2. ✅ 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.

3. ✅ 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.

4. ✅ 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.

5. ✅ 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.

6. ✅ 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:

  1. 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.
  2. 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
  3. 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
  4. 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.
  5. 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.
  6. 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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Completed?1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 3 - Get Last frame

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Update video url

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 5 - Extract last frame

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Wait 10 sec.

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 7 - Get status Extract Frame

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Set params

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Completed?5

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Upload Video2

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 11 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Generate clip

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 15 - Get status clip

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Wait 60 sec.

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 17 - Completed?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Set VideoUrls Json

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Get videos to merge

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 20 - Get final video file

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 21 - Get status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 22 - Get final video url

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 23 - Update video url2

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 24 - Wait 30 sec.

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Showing the first 24 of 37 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Extend and merge UGC viral videos using Kling 2.1, then publish on social media
Complexity advanced
Nodes 37
Categories Content Creation, Multimodal AI
Author Davide
Published 11 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11710/11710.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Extend and merge UGC viral videos using Kling 2.1, then publish on social media do?

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, I...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.