AI Carousel Ad Generator for E-commerce Social Media - n8n Workflow

Automate social media content creation using this n8n workflow. Input product details and a hero image to generate four hyper-relevant promotional images and a conversion-focused caption using Gemini 2.5 and GPT-4.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce Marketing Teams needing rapid, scalable social content creation.

  • Content Creators and Agencies looking to automate the image storyboarding and production process.

  • Developers interested in leveraging advanced image-to-image AI capabilities within an n8n node.

  • Users searching for robust n8n templates for generative AI marketing.

Overview

Generating high-quality, conversion-focused promotional carousels for platforms like Instagram and TikTok is time-consuming. This specialized n8n workflow solves this by utilizing a powerful LangChain AI agent combined with Google Gemini 2.5 Flash for image generation and editing. The user initiates the process via a simple Webhook form, providing a product description and an initial photo. The core logic of this n8n template then automatically designs a 4-frame storyboard, generates four distinct promotional images (complete with people and promotional text overlays), writes a punchy caption using GPT-4, and publishes the final content across multiple social platforms. This allows for massive scaling of marketing efforts with minimal manual intervention, transforming your content strategy using this powerful n8n automation.

How it Works

The entire process is initiated by the n8n trigger, a dedicated Photo Upload Form Webhook.


  1. Input Collection: The user uploads a product photo and provides a descriptive text (the product description) via the form.

  2. AI Storyboarding: An Storyboard Agent (a LangChain component running on Google Gemini 2.5 Pro) receives the description. This AI acts as a creative director, analyzing the input to generate a compact JSON output containing four detailed, promotional image prompts, focusing on incorporating users and visible CTAs. It uses a structured output parser for reliability.

  3. Variable Setup: The four resulting image prompts and other necessary variables (like API keys and image count) are stored using Set n8n node.

  4. Initial Upload: The original product photo is uploaded to ImgBB to obtain a public URL, which is required for the subsequent AI image editing steps.

  5. Parallel Image Generation: The n8n workflow splits into four parallel branches. Each branch uses the Gemini 2.5 Flash - Generate Image n8n node (via HTTP Request to the Fal.ai service) to perform image editing. It takes the original image URL and one of the four unique promotional prompts, ensuring visual consistency while generating distinct scenes.

  6. Image Processing & Storage: In each branch, the temporary AI-generated image is downloaded (via HTTP Request n8n node), renamed, and then permanently uploaded to ImgBB, providing four reliable URLs.

  7. Aggregation: The four branches Merge and Aggregate the final image URLs and story context.

  8. Caption Generation: An OpenAI n8n node (GPT-4) generates a short, engaging, and conversion-focused social media description based on the four image prompts.

  9. Publishing: Finally, the Upload Post n8n node publishes the carousel using the generated caption and the four ImgBB URLs across all configured social media platforms, completing this comprehensive n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


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

  2. Credentials Setup: You must configure the following credentials:

Fal.ai HTTP Header Auth: Required for the Gemini 2.5 Flash image editing service.
Google Gemini/Palm API Key: Required for the main LangChain Agent/Google Gemini Chat Model n8n node.
OpenAI API Key: Required for the GPT-4 caption generation n8n node.
Upload Post API: Required to publish the final content to social media.

  1. API Key Configuration: Open the Set APIs Vars n8n node and replace the placeholder imgbb_token value with your actual ImgBB API key.

  2. Trigger Activation: Navigate to the Photo Upload Form n8n trigger and click 'Save' and 'Activate' to start listening for inputs. You can test the form directly from the URL provided by the n8n node settings.

Node Details

Photo Upload Form (n8n trigger): The starting point. It uses a Webhook to expose a form for non-technical users to input a mandatory product photo and a product description, feeding the data into the n8n workflow.
Storyboard Agent (LangChain Agent): This critical n8n node uses the product description to generate four specific image prompts and structural details needed for the carousel. It ensures the content is aligned with promotional goals (using models/gemini-2.5-pro).
Structured Output Parser2: Attached to the Storyboard Agent, this ensures the AI response is strictly a valid JSON object, making downstream processing in the n8n workflow reliable.
Upload Original Image to imgbb (HTTP Request): Handles the initial product image upload, converting the binary data from the n8n trigger into a persistent, accessible URL required by the Gemini image editing model.
Gemini 2.5 Flash - Generate Image X (HTTP Request): Four parallel branches use this n8n node to call the Fal.ai Gemini image editing API. It combines the structured AI prompts with the original image URL to generate the specific promotional content for each carousel frame.
Rename to photo X (Code n8n node): Essential for transforming the downloaded image data into a named binary field (e.g., photo2), which is required by the ImgBB uploader for multipart form data submission in the next step of the n8n workflow.
Generate Carousel Description (OpenAI n8n node): Leverages GPT-4 to create compelling, short, social media captions, ensuring the final output of the n8n workflow includes strong copy.
Upload Post (Upload Post n8n node): The final action. It takes the four generated image URLs and the OpenAI caption, publishing the complete promotional carousel simultaneously across Instagram, Facebook, TikTok, and YouTube.

Related n8n Workflows

Free

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

Follow me in linkedin: https://www.linkedin.com/in/juan-carlos-cavero-gracia/

Featured*