# Consistent UGC AD Video Agent v1 in n8n

## Download Workflow Resources👇

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765293535995/b7eaf645-b207-479e-934e-c2084a0bb709.png align="center")

Download Workflow JSON: [https://n8dex.com/2fnCXaER](https://n8dex.com/2fnCXaER)

Copy Google Sheet: [https://docs.google.com/spreadsheets/d/1PVFbX\_DkGf8l-bFCWXkTi\_oDGgtSjPkPbRoI\_Ryi6Pw/copy](https://docs.google.com/spreadsheets/d/1PVFbX_DkGf8l-bFCWXkTi_oDGgtSjPkPbRoI_Ryi6Pw/copy)

Video Output:

<iframe width="640" height="360" src="https://mega.nz/embed/ZEsChDTR#-aZvkXK9E-yVKdspsBF1tzkbHFxzevRBP_HIt_NxP8c"></iframe>

<iframe width="640" height="360" src="https://mega.nz/embed/FREDzRRY#ZX2-NNp8T72ZMQi3a8CNIxg9kQoemBIW6-neIPoQgY0"></iframe>

%[https://youtu.be/46ci2rPvmfc] 

---

## **Want to Go Further? Join the Community**

If you want to go deeper, learn faster, and be part of a motivated community, you can join my skool:

**👉https://link.thesohailjafri.me/join-skool**

Or watch all my free automations on [YouTube - AI With Sohail](https://www.youtube.com/@ai_with_sohail)

For paid work contact: [https://link.thesohailjafri.me/contact-ai](https://link.thesohailjafri.me/contact-ai)

---

## ⭐ What This Automation Does

* Reads **Pending** tasks from Google Sheets
    
* Generates a **merged UGC image** using:
    
    * Product photo
        
    * Person photo
        
    * Text instructions
        
* Generates **Start Frame** + **End Frame** prompts using NanoBanana format
    
* Builds a **VEO3-compatible script** using a dedicated system prompt
    
* Sends everything to **KIE VEO** to generate video
    
* Polls until video is ready
    
* Uploads images & collects final URLs
    
* Updates success/failure back to Sheets
    

---

## 🧠 High-Level Flow

### 1\. **Trigger**

A schedule checks for rows where **Status = Pending** in the Google Sheet.

### 2\. **Read Pending Task**

Pulls data from the row:

* Product name, description, photo
    
* Person name, description, photo
    
* Target audience
    
* Video instructions
    
* Aspect ratio
    

### 3\. **Prepare Row Data**

The workflow formats all fields into a single combined string for model prompts.

### 4\. **Generate Character-Consistent Images**

Using OpenRouter (Gemini 2.5 Flash Image):

* Creates a merged image containing the product + person
    
* Uploads the merged image and stores URL
    

### 5\. **Generate First/Last Frame Prompts**

Using the **NanoBanana 2-frame prompt generator**:

* Creates **Start Frame** + **End Frame** descriptions
    
* Ensures character identity and product accuracy
    
* Produces negative prompts for safety
    

### 6\. **Create VEO3 Prompt**

The agent creates a clean, influencer-style selfie script:

* Safety rules enforced (non-erotic, modest clothing, natural look)
    
* Uses combined metadata + merged image
    
* Returns a VEO-ready prompt + orientation
    

### 7\. **Generate Video**

Sends the prompt + images to **KIE VEO**:

* Model: `veo3_fast`
    
* Mode: `FIRST_AND_LAST_FRAMES_2_VIDEO`
    

### 8\. **Poll for Video Completion**

The workflow waits and checks until:

* Video is ready → continue
    
* Error code ≥ 400 → fail the task
    

### 9\. **Update Google Sheet**

* On success → mark **Completed** + attach video URL
    
* On failure → mark **Failed**
    

---

## 🔧 Tech Stack Used

### **n8n**

### **OpenRouter (GPT-4.1 Mini + Gemini Image)**

### **KIE VEO3**

### **Google Sheets**

---

## ✔️ How to Use

1. Add a new task to the Google Sheet row.
    
2. Fill in ALL required fields.
    
3. Set **Status → Pending**.
    
4. Wait for the scheduled run (or run manually in n8n).
    
5. Get your UGC video with consistent character + product branding.
    

---

## **Want to Go Further? Join the Community**

If you want to go deeper, learn faster, and be part of a motivated community, you can join my skool:

**👉https://link.thesohailjafri.me/join-skool**

Or watch all my free automations on [YouTube - AI With Sohail](https://www.youtube.com/@ai_with_sohail)

For paid work contact: [https://link.thesohailjafri.me/contact-ai](https://link.thesohailjafri.me/contact-ai)
