Skip to main content

Generate UGC marketing videos for eCommerce with Sora 2 and Gemini

Workflow preview

Workflow preview
100%
Generate UGC marketing videos for eCommerce with Sora 2 and Gemini preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

& Setup This n8n template demonstrates how to automatically generate authentic User Generated Content (UGC) style marketing videos for eCommerce products using AI. Simply upload a product image, an...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.set, n8n-nodes-base.extractfromfile, n8n-nodes-base.converttofile, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.splitout

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Walter.

Original n8n.io source

1.1 Workflow description

Title
Generate UGC marketing videos for eCommerce with Sora 2 and Gemini
Workflow name
Generate UGC marketing videos for eCommerce with Sora 2 and Gemini

Overview & Setup

This n8n template demonstrates how to automatically generate authentic User-Generated Content (UGC) style marketing videos for eCommerce products using AI. Simply upload a product image, and the workflow creates multiple realistic influencer-style video ads complete with scripts, personas, and video generation.

Use cases

  • Generate multiple UGC video variations for A/B testing
  • Create authentic-looking product demonstrations for social media
  • Produce influencer-style content without hiring creators
  • Quickly test different marketing angles for new products
  • Scale video content creation for eCommerce catalogs

Good to know

  • Sora 2 video generation takes approximately 2-3 minutes per 12-second video
  • Each video generation costs approximately $0.50-1.00 USD (check OpenAI pricing for current rates)
  • The workflow generates multiple video variations from a single product image
  • Videos are automatically uploaded to Google Drive upon completion
  • Generated videos are in 720x1280 (9:16) format optimized for social media

How it works

  1. Product Analysis: OpenAI's vision API analyzes the uploaded product image to understand its features, benefits, and target audience
  2. Persona Creation: The system generates a detailed profile of the ideal influencer/creator who would authentically promote this product
  3. Script Generation: Gemini 2.5 Pro creates multiple authentic UGC video scripts (12 seconds each) with frame-by-frame breakdowns, natural dialogue, and camera movements
  4. Frame Generation: For each script, Gemini generates a custom first frame that adapts the product image to match UGC aesthetic and aspect ratio
  5. Video Production: Sora 2 API generates the actual video using the script and custom first frame as reference
  6. Status Monitoring: The workflow polls the video generation status every 15 seconds until completion
  7. Upload & Storage: Completed videos are automatically uploaded to Google Drive with organized naming

How to use

  1. Click the form trigger URL to access the submission form
  2. Upload your product image (works best with clean product shots on white/neutral backgrounds)
  3. Enter the product name
  4. Submit the form and wait for the workflow to complete
  5. Find your generated UGC videos in the specified Google Drive folder
  6. Each run produces multiple video variations you can test

Requirements

  • OpenAI API account with Sora 2 access for video generation and GPT-4 Vision
  • Google Gemini API account for script generation and image adaptation
  • Google Drive account for video storage
  • Sufficient API credits for video generation (budget accordingly)

Customizing this workflow

  • Adjust the video duration in the generate_video node (currently set to 12 seconds)
  • Modify the persona prompt in analyze_product node to target different audience demographics
  • Change the script style in set_build_video_prompts node for different UGC aesthetics (excited discovery, casual recommendation, etc.)
  • Update the Google Drive folder in upload_video node to organize videos by campaign
  • Add additional processing nodes for video editing, subtitle generation, or thumbnail creation
  • Modify the aspect ratio in resize_image node for different platforms (1:1 for Instagram feed, 16:9 for YouTube, etc.)

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - form_trigger

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.3

Block 2 - analyze_product

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 3 - set_model_details

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - set_build_video_prompts

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - convert_product_to_base64

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 6 - convert_product_to_image

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 7 - extract_prompts

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 8 - prompts-parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 9 - split_prompts

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 10 - iterate_prompts

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 11 - generate_video

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - get_video_status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - get_video

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - check_status

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 15 - delay

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 16 - generate_frame

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - set_frame_result

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - get_frame_image

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 19 - resize_image

Type / Role
n8n-nodes-base.editImage - editImage
Config choices
Version 1

Block 20 - gemini-2.5-pro

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 21 - upload_video

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 22 - generate_ad_prompts

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 23 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate UGC marketing videos for eCommerce with Sora 2 and Gemini
Complexity advanced
Nodes 24
Categories Content Creation, Multimodal AI
Author Lucas Walter
Published 09 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9432/9432.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate UGC marketing videos for eCommerce with Sora 2 and Gemini do?

& Setup This n8n template demonstrates how to automatically generate authentic User Generated Content (UGC) style marketing videos for eCommerce products using AI. Simply upload a product image, an...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.