Automatic AI Video Generation and Multi-Platform Publishing - n8n Workflow

Use this comprehensive n8n workflow to fully automate short-form video creation. Scripts generated by Gemini, video produced by KIE AI, and posted using Blotato for YouTube, Instagram, and more.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content creators needing consistent, scalable short-form video output.

  • Marketing teams looking to automate social media posting.

  • Automation specialists building complex AI media pipelines.

  • Users who require advanced n8n templates integrating multiple AI services (Gemini, KIE AI).

  • Social media managers seeking to synchronize content across platforms like YouTube, Instagram, and Facebook.

Overview

Scaling content production can be time-consuming, requiring constant manual scripting, rendering, and cross-posting. This powerful n8n workflow eliminates those bottlenecks entirely. It acts as a dedicated content factory, running on a fixed schedule (using the n8n trigger) to produce fresh, humorous pet-themed videos.

By leveraging the Google Gemini model for structured scripting and KIE AI (Sora-style generator) for video creation, this n8n template ensures high-quality output. The subsequent Blotato integration manages the heavy lifting of media upload and simultaneous publication across channels like YouTube, Instagram, Facebook, and Bluesky. This robust n8n automation provides a complete solution for creators aiming for high content velocity without manual intervention.

How it Works

This highly automated n8n workflow executes in several distinct phases, starting with the primary n8n trigger:


  1. Scheduled Start: The Schedule Trigger initiates the process every 12 hours.

  2. Concept Selection: A Code in JavaScript n8n node selects a random template index (1-7) to ensure variety in the generated content theme.

  3. AI Scripting: The AI Agent, powered by the Google Gemini Chat Model, uses the selected index to generate a structured JSON output containing a catchy title, a descriptive summary, and the detailed video generation prompt. The Structured Output Parser guarantees the integrity of this crucial data.

  4. Video Generation: An HTTP Request n8n node sends the detailed prompt to the KIE AI API, initiating the video rendering task. The Wait n8n node then halts the workflow execution, pausing until KIE AI confirms the video is fully rendered.

  5. Video Retrieval: A subsequent Get HTTP Request retrieves the final, publicly accessible video URL from KIE AI.

  6. Multi-Platform Publishing: The video URL is passed to the Blotato Upload media1 n8n node. Finally, a cascade of Blotato Create post n8n nodes uses the title and description generated earlier to publish the content simultaneously across linked platforms, including YouTube, Instagram, Facebook, Bluesky, and LinkedIn/X.

Installation Guide

To deploy this advanced n8n workflow, follow these setup steps:


  1. Import: Copy the provided JSON and import it into your self-hosted n8n instance (Note: Community nodes like Blotato require self-hosting).

  2. Credentials: You must set up three different sets of credentials in your n8n environment:

Connect your Google Gemini API key to the Google Gemini Chat Model n8n node.
Configure Generic HTTP Header Authentication for the KIE AI create video and Get n8n nodes.
* Set up Blotato credentials for media upload and posting.

  1. Customization: Review the Schedule Trigger to adjust the run frequency. Open the KIE AI create video n8n node to configure video parameters (aspect ratio, frame count, etc.).

  2. Blotato Setup: Crucially, open every Blotato posting n8n node (YouTube, Instagram, Facebook, Bluesky) and replace the placeholder YOURACCOUNTID values with your actual connected Blotato accounts to ensure the n8n workflow posts correctly.

Node Details

Schedule Trigger (n8n trigger): The entry point for the automation. Configured to run the n8n workflow every 12 hours, ensuring continuous content creation.
Code in JavaScript: Generates a randomized number (1-7) to select unique creative prompts defined in the Gemini system message, adding variety to the content.
AI Agent / Google Gemini Chat Model: This crucial n8n node generates structured JSON output (title, description, prompt) based on the random concept index, ensuring consistency.
Structured Output Parser: A defensive n8n node that forces the Gemini response to conform to the required JSON schema, preventing downstream errors.
create video (HTTP Request): Sends the finalized AI prompt to the KIE AI API to begin the GPU-intensive video rendering task.
Wait1: A mandatory n8n node that pauses the flow after video creation is requested, waiting for KIE AI's asynchronous rendering to complete before proceeding.
Get (HTTP Request): Queries the KIE AI API status endpoint repeatedly until the video is finished, then retrieves the final video file URL.
Upload media1 (Blotato n8n node): Takes the final video URL and uploads the media asset to the Blotato system, preparing it for multi-platform distribution.


  • Youtube, Instagram, Facebook, Bluesky (Blotato n8n nodes): These nodes utilize the uploaded media and the generated title/description to publish the content simultaneously to their respective social platforms. You can easily duplicate these n8n templates to add other platforms.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Freelance automation developer building custom n8n workflows, AI pipelines, and social media automation systems. Open for collaborations and custom project requests.

Featured*