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

Use this advanced n8n workflow to automate the creation of viral video content using NanoBanana 2 PRO and VEO3.1, triggered via Telegram, and instantly published across all major social networks via Blotato. This n8n workflow is a complete content solution.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Social Media Marketing Agencies needing rapid content production.

  • Digital Content Creators aiming for high-volume, automated video output.

  • Businesses seeking to leverage AI tools (NanoBanana, VEO) for marketing campaigns.

  • Developers interested in complex AI Orchestration using the n8n platform.

Overview

Creating high-quality, consistent viral content across multiple platforms is time-consuming. This powerful n8n workflow solves this problem by providing a seamless, automated content pipeline. Starting with a simple text and image sent to a Telegram bot, the system uses advanced AI models—NanoBanana 2 PRO for reference image editing and VEO3.1 for cinematic video generation—to produce a final video. The workflow then leverages the Blotato n8n node to simultaneously post this content to platforms like TikTok, YouTube, Instagram, and more. This n8n template dramatically reduces the manual steps involved in content creation and distribution, making it an essential n8n workflow for any serious content strategy.

How it Works

This n8n workflow operates in three major phases:

1. Initiation and Image Creation


  1. Telegram Trigger: The entire process begins when the user sends an idea (caption) and a reference image to a Telegram bot. This is the starting n8n trigger for the automation.

  2. Data Extraction: The workflow captures the Telegram file ID and uses an HTTP Request to get the secure file URL.

  3. Image Analysis (OpenAI Vision): OpenAI Vision analyzes the reference image and caption to extract structured details (colors, style, visual description).

  4. Prompt Generation: An AI Agent (Generate Image Prompt) uses the analysis to create a hyper-realistic, UGC-style prompt for NanoBanana 2 PRO.

  5. Image Editing (NanoBanana): An HTTP Request sends the prompt and the original image to NanoBanana to generate a final, optimized reference image.

  6. Waiting: The n8n workflow waits for the external image generation job to complete before downloading the final image.

2. Video Generation (VEO3.1)


  1. Video Script Generation: Another AI Agent (AI Agent: Generate Video Script) receives the newly generated image URL and the user’s original caption. It uses a predefined json_master prompt structure (set in the n8n node) to output a highly detailed, structured prompt, along with the video title, caption, and hashtags.

  2. Prompt Optimization: The Optimize Prompt for Veo n8n node adds technical parameters (e.g., 8 seconds duration, 9:16 aspect ratio) to finalize the VEO generation prompt.

  3. VEO Generation: An HTTP Request initiates the VEO3.1 video generation process (via fal.run), referencing the optimized prompt and the image generated in step 1.

  4. Download: After another waiting period, the final video file is downloaded.

  5. Telegram Confirmation: The final video is sent back to the user via Telegram, confirming the content is ready.

3. Multi-Platform Publishing (Blotato)


  1. Blotato Upload: The downloaded video is uploaded to the Blotato service using the dedicated Blotato n8n node.

  2. Simultaneous Publishing: Using the rich output metadata (title, caption, hashtags) generated by the AI agent, the n8n workflow automatically publishes the video to six different social media platforms using subsequent Blotato n8n node instances (Tiktok, LinkedIn, Facebook, Instagram, Twitter/X, and YouTube).

  3. Final Notification: A final Telegram message confirms successful publication across all channels. This comprehensive n8n workflow is a robust example of full-cycle automation.

Installation Guide

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


  1. Import the n8n Workflow: Copy the provided JSON data and import it into your n8n instance using the 'New' > 'Import from JSON' function.

  2. Install Required Nodes: Ensure the necessary community nodes are installed, specifically the Blotato node (@blotato/n8n-nodes-blotato). You may need to enable 'Verified Community Nodes' in your n8n settings.

  3. Credential Setup: You must configure the following credentials in your n8n environment:

OpenAI API: For the OpenAI Chat Model and OpenAI Vision n8n nodes.
Telegram API: For the starting Telegram Trigger and the final message actions. Set up the webhook for the n8n trigger.
* Blotato API: Create a Blotato API key and set up the credential for the Blotato n8n nodes.

  1. Set Placeholder Tokens: Update the Set: Bot Token (Placeholder) n8n node with your actual Telegram Bot Token (YOURBOTTOKEN) and your Fal API key (YOURfalapi_key). These values are critical for the HTTP Request n8n node actions (NanoBanana and VEO).

  2. Activate and Test: Once credentials and placeholders are configured, activate the n8n workflow and send a message with an image and a caption to your configured Telegram bot to test the full automation cycle.

Node Details

Telegram Trigger: Receive Video Idea: This is the initial n8n trigger. It listens for incoming messages containing media (photo) and a caption, starting the entire content creation n8n workflow.
Set: Bot Token (Placeholder): A core logic n8n node that stores essential API keys and bot tokens needed for dynamic URL construction (especially for accessing Telegram files and Fal AI services).
OpenAI Vision: Analyze Reference Image: An n8n node that uses GPT-4o to analyze the reference image from Telegram, outputting structured YAML data essential for prompt generation.
Generate Image Prompt (AI Agent): A Langchain Agent n8n node configured to build a specialized, high-fidelity prompt for NanoBanana, ensuring the generated content adheres to UGC style guidelines.
NanoBanana: Create Image (HTTP Request): This n8n node calls the Fal AI service for NanoBanana 2 PRO to perform image-to-image editing based on the AI-generated prompt.
AI Agent: Generate Video Script: A highly complex Langchain Agent n8n node that takes the edited image and user prompt to generate the structured JSON output required for VEO3.1, including cinematic prompt, title, caption, and hashtags. This n8n node ensures standardized output.
Veo Generation (HTTP Request): Calls the Fal AI VEO3.1 model to generate the video using the highly detailed, structured prompt.
Wait & Download Edited Image / Download Video: Essential Wait and HTTP Request n8n node pairs used to poll and retrieve the results of asynchronous AI generation tasks (image and video).
Upload Video to BLOTATO (Blotato): This dedicated Blotato n8n node uploads the final video, preparing it for multi-platform distribution.
Tiktok, Linkedin, Facebook, Instagram, Twitter (X), Youtube (Blotato Nodes): Six separate Blotato n8n node instances that use the video URL and the metadata generated earlier to publish the content simultaneously across all major social networks. This demonstrates excellent use of the n8n node ecosystem.

Related n8n Workflows

Free

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

Automation expert and certified trainer. I create hands-on courses to master automation with n8n. Contact me to access my exclusive training and start building powerful workflows today. 🚀

Featured*