AI-Powered Cinematic Product Video Generator - n8n Workflow

Generate highly personalized, data-driven product videos automatically using this advanced n8n workflow. Integrates Foreplay competitor data, Google Gemini, and video generation APIs.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

This advanced n8n template is ideal for:

Performance Marketers: Automating the creation of new video ad concepts based on proven competitor strategies.
Brand Managers: Generating high-volume, personalized video assets quickly without relying on manual scripting.
Content Creators: Leveraging AI tools like Gemini and Sora 2 clones directly within an integrated n8n workflow.
Automation Specialists: Users seeking complex, multi-API integrations using the powerful http request n8n node and AI agents.

Overview

Generating high-quality, conversion-focused video ads often requires extensive research and creative time. This sophisticated n8n workflow solves this by merging data-driven competitor analysis with cutting-edge generative AI.

It leverages Foreplay’s API to fetch successful ad data (descriptions, transcripts, emotional drivers) for a specific niche. This data is then fed into a Google Gemini Agent (running within an n8n node) which crafts a compelling, cinematic video prompt. This prompt, alongside a product image fetched from Google Drive, is sent to a text-to-video API (Kie.ai, using a Sora-like model) for rendering. Finally, the finished video is automatically saved back to Google Drive.

This robust n8n automation ensures you can generate personalized, high-quality video ads in batches, scaling your creative output dramatically. This is a perfect example of what complex n8n templates can achieve.

How it Works

This powerful n8n workflow follows a complex, iterative process:


  1. Trigger & Setup: The Manual Trigger starts the process. Credentials and product context (niche, category, name) are set using dedicated Set n8n nodes.

  2. Data Acquisition: The workflow fetches the main product image from Google Drive and uses an HTTP Request n8n node to pull recent, high-performing video ad data from the Foreplay API, filtering by niche and duration.

  3. Data Preparation: The Split Foreplay Response node separates the array of competitor ads, and the Assemble Video Input Data node combines this competitor data (description, mood, transcript) with the public product image URL.

  4. Batch Processing: The Iterate Over Ad Examples node ensures that the subsequent AI steps run for each competitor ad example fetched, generating a unique video concept for each item.

  5. AI Prompt Generation: The Generate Video Prompt n8n node (a Langchain Agent powered by the Google Gemini LLM) processes the combined data. It uses a detailed system prompt to create a rich, cinematic text-to-video description, incorporating product details and competitor emotional drivers.

  6. Video Task Creation: An HTTP Request n8n node sends the AI-generated prompt and the product image URL to the Kie.ai API to initiate the text-to-video rendering task.

  7. Status Polling Loop: The workflow enters a loop using a Check Video Generation Status http request n8n node, a Switch node, and a Wait Before Checking Again n8n node. If the video is still processing, the flow waits for 1 minute and checks again. This loop continues until 'success' or 'failure' is reported.

  8. Storage: Upon successful completion, the Download Finished Video http request n8n node retrieves the final video file, which is then saved to the designated folder using the Upload Generated Video to Google Drive n8n node. The loop then continues to process the next item in the batch.

Installation Guide

To deploy this expert n8n workflow, follow these steps:


  1. Import the n8n Template: Copy the provided JSON code and import it directly into your n8n instance.

  2. Connect Credentials: You need credentials for Google Drive, Google Gemini, and Kie.ai (or equivalent text-to-video service).

  3. Update Credentials Node: Open the Set Workflow Credentials n8n node and update the placeholder expressions for GOOGLEDRIVEFOLDERID (for source images and generated videos) and FOREPLAYAPI_KEY.

  4. Configure AI Agent: Ensure your Google Gemini credential is set up correctly and connected to the Google Gemini LLM n8n node.

  5. Configure Kie.ai: Set up your Kie.ai API key (or generic HTTP Bearer Auth) and connect it to the Create Video Task and Check Video Generation Status n8n nodes.

  6. Define Product: Adjust the values in the Set Product Information n8n node to match your specific product name, niche, category, and target market.

  7. Run: Execute the Manual Trigger n8n trigger to test your first batch of video generations.

Node Details

This n8n workflow utilizes several specialized n8n nodes to manage data flow and AI integration:

Set Workflow Credentials (Set n8n node): Stores sensitive data and IDs (like Foreplay API key, Google Drive folder IDs) using expressions, centralizing configuration for the entire n8n template.
Fetch Competitor Video Data (HTTP Request n8n node): Acts as the data engine, securely calling the Foreplay API to retrieve competitor ad details based on specific product filters.
Assemble Video Input Data (Set n8n node): Consolidates necessary inputs (transcription, mood scores, product image URL) into a single data item before running the generative AI processes.
Iterate Over Ad Examples (Split In Batches n8n node): Crucial for batch processing. It processes each competitor ad data item individually, allowing the video generation process to run in parallel or sequence for multiple video ideas.
Generate Video Prompt (Agent n8n node, powered by Gemini): This is the core creativity n8n node. It functions as an intelligent agent, taking structured data and applying complex instructions (defined in the system message) to generate a high-quality, descriptive text prompt suitable for state-of-the-art text-to-video models.
Create Video Task (HTTP Request n8n node): Submits the AI-generated prompt and product image to the Kie.ai video API, starting the intensive video rendering process.
Check Video Generation Status (HTTP Request n8n node) & Video Generation Status (Switch n8n node): Manages the asynchronous nature of video rendering. This combination of n8n nodes polls the API until the job status changes to 'success'.
Wait Before Checking Again (Wait n8n node): Pauses the n8n workflow for 1 minute to avoid overloading the generation API while the video is being rendered.


  • Upload Generated Video to Google Drive (Google Drive n8n node): The final step of the n8n workflow, saving the finished video asset securely for easy access.

Related n8n Workflows

Free

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

AI Automation Developer

Featured*