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

Generate viral animal battle shorts automatically using this advanced n8n workflow. It combines Google Sheets, LLM prompt engineering, Flux AI image generation, Creatomate video rendering, and Blotato multi-platform publishing (Instagram, TikTok, YouTube).

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content creators and digital marketers specializing in viral short-form video content.
Users needing a scalable solution for high-volume video production without manual editing.
n8n automation specialists looking for complex n8n templates integrating multiple AI services (LLMs, image generation, video rendering).
Anyone interested in leveraging Flux AI, Creatomate, and n8n to generate unique video assets.

Overview

Generating engaging, high-quality, short-form video content at scale is resource-intensive. This powerful n8n workflow solves this by automating the entire content lifecycle. It starts with an idea tracked in Google Sheets, uses AI agents to engineer detailed image prompts, leverages the Flux AI model via PiAPi for photorealistic image generation, combines these images into a cinematic video using Creatomate, and finally publishes the result to Instagram, TikTok, and YouTube via Blotato. This n8n workflow is a complete factory for automated viral video content creation, minimizing manual intervention and maximizing throughput. The complexity of orchestrating these tasks highlights the power of the n8n node ecosystem.

How it Works

This comprehensive n8n workflow executes in several distinct phases:


  1. Trigger and Data Retrieval: The process begins with a Schedule Trigger. The first n8n node, a Google Sheets node (Get Main Character), fetches the main animal character idea marked 'To Do' from the linked spreadsheet.

  2. Scene Planning (LLM): The Scene Creator n8n agent (using OpenRouter's GPT-4.1-mini) takes the main character and suggested category of opponents, generating eight unique opponent matchups for the video.

  3. Prompt Engineering for Close-Ups: The flow loops through the 8 opponents. The Image Prompt Generator n8n agent crafts hyper-realistic, aggressive close-up image prompts for both the main character and the specific opponent.

  4. Image Generation (Flux AI): The Generate Close Ups HTTP Request n8n node sends these prompts to the PiAPi API, utilizing the Flux AI model to generate 1024x1024 photorealistic images.

  5. Synchronization and Storage: After a 90 seconds wait period, the image URLs are retrieved and stored back in the Google Sheets (Add Close Ups).

  6. Prompt Engineering for Winner Scene: A separate LLM Agent (Winner Image Prompt, using GPT-4.1) is used to create a dramatic prompt for the vertical 'winner' scene (the aftermath of the battle) for each matchup.

  7. Vertical Image Generation: These prompts are sent to PiAPi/Flux AI (Generate Scene) to create 540x960 vertical images.

  8. Video Rendering (Creatomate): Once all 24 required image URLs (8 scenes x 3 images) are compiled, a Google Sheets n8n node retrieves them. The Render Video n8n node triggers the Creatomate API, dynamically inserting all 24 image URLs into the video template.

  9. Video Retrieval and Publishing: After another wait period, the final video URL is fetched (Get Video), the Google Sheet is updated, and the video is uploaded to Blotato. Finally, dedicated HTTP Request nodes publish the video simultaneously to Instagram, TikTok, and YouTube, completing this complex n8n workflow.

Installation Guide

To deploy this powerful n8n workflow template, follow these setup steps:


  1. Import: Copy and paste the provided JSON into your n8n instance.

  2. Google Sheets Setup: Create copies of the necessary Google Sheets template. You must connect five Google Sheets n8n node instances with your appropriate credentials and spreadsheet ID.

  3. OpenRouter Credentials: Configure OpenRouter API credentials for the two LLM chat nodes (GPT 4.1-mini and GPT 4.1). This is crucial for the advanced prompt engineering within the n8n workflow.

  4. PiAPi Credentials (Flux AI): Set up generic HTTP Header authentication credentials for PiAPi (Flux AI) to manage the four image generation request nodes (Generate Close Ups, Get Close Ups, Generate Scene, Get Winners).

  5. Creatomate Setup: Configure the Render Video n8n node with your Creatomate API key (Bearer token) and your specific video template ID.

  6. Blotato Setup: Create an account with Blotato and configure the API key for automated social media publishing via the Upload to Blotato, Instagram, TikTok, and YouTube HTTP Request n8n nodes. Ensure you update the accountId parameter in the publishing nodes.

Node Details

This n8n workflow utilizes a highly specialized set of n8n node types:

Schedule Trigger: The starting n8n trigger, initiating the automation on a defined schedule or manually.
Google Sheets (Get Main Character, Add Close Ups, Add Winner, Get Elements, Google Sheets): Handles all data persistence, tracking the status, retrieving the character prompt, and storing the image URLs generated by the AI.
AI Agent (Scene Creator, Image Prompt Generator, Winner Image Prompt): These specialized n8n nodes utilize LangChain integration to perform complex, multi-step prompt engineering, defining matchups and crafting detailed visual instructions for Flux AI.
Output Parser Structured (Scenes, Close Ups): Ensures the LLM output is strictly formatted as JSON for reliable data handling throughout the n8n workflow.
HTTP Request (Generate Close Ups, Generate Scene): Sends API requests to PiAPi, enabling text-to-image generation using the Flux AI model. This is a core component of the n8n template.
Wait (90 seconds, 90seconds, 90Seconds): Essential asynchronous flow control to pause the n8n workflow while external AI services (image and video generation) process the tasks.
HTTP Request (Render Video): Calls the Creatomate API to stitch the 24 generated images into the final video, dynamically mapping the image URLs via expressions.
HTTP Request (Upload to Blotato, Instagram, TikTok, YouTube): These n8n nodes handle the final distribution, utilizing the Blotato service to automatically upload and publish the finished vertical video to multiple social media channels.

Related n8n Workflows

Free

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

Hi 👋 I'm Jadai kongolo. As an AI Automation Expert, I’m passionate about simplifying tech and empowering small businesses and young coders through AI automation. With my AI agency, Oki, I create efficient, n8n-powered workflows that save time, streamline operations, and boost growth for SMBs.

Featured*