Insane_AI_Workflow_Creates_Viral_UGC_Videos_Automation

    Shared 11/25/2025

    582 views

    Visual Workflow

    JSON Code

    {
      "id": "Dud5GKmW9yE8X68O",
      "meta": {
        "instanceId": "9fb634bb746cbe3fe9f7fa86fdd635510d2f0c24c4ba919fbba1ca6aec3c4e57",
        "templateCredsSetupCompleted": true
      },
      "name": "AI UGC Video Automation",
      "tags": [],
      "nodes": [
        {
          "id": "75b27a08-e284-4022-bcff-c56c59fa2100",
          "name": "Schedule Trigger",
          "type": "n8n-nodes-base.scheduleTrigger",
          "position": [
            -96,
            1936
          ],
          "parameters": {
            "rule": {
              "interval": [
                {}
              ]
            }
          },
          "typeVersion": 1.2
        },
        {
          "id": "698e9c92-ffc6-46e8-95c6-f414d3a4efc8",
          "name": "Veo Image Prompt",
          "type": "@n8n/n8n-nodes-langchain.agent",
          "position": [
            -112,
            2304
          ],
          "parameters": {
            "text": "=Target Audience: {{ $json['Target Audience'] }}\nProduct Description: {{ $json['Product Description'] }}\nVideo Instructions: {{ $json['Video Instructions'] }}",
            "options": {
              "systemMessage": "=You are an expert in hyper-realistic user-generated content (UGC) photography.\nYour task is to generate ONE highly detailed image-generation prompt based on the user’s inputs.\n\nYou will receive:\n- Target audience\n- Product description\n- Product image (must remain unchanged)\n- Video or scene instructions\n\nOUTPUT REQUIREMENT:\nReturn ONE complete, detailed UGC-style image-generation prompt as plain text (not an array, not JSON).\n\n---------------------------------------\nPROMPT CREATION RULES\n---------------------------------------\n\nEach image-generation prompt must include:\n\n1. HUMAN REALISM\n   - Describe a realistic human influencer with natural skin details, slight asymmetry, visible pores.\n   - Hand details: nails, grip, soft wrinkles, natural hold.\n\n2. PRODUCT ACCURACY\n   - The product must appear EXACTLY as in the provided product image.\n   - No changes, no enhancements, no reinterpretations.\n\n3. COMPOSITION & PERSPECTIVE\n   - Selfie-style framing.\n   - Product held prominently in the foreground, angled slightly toward the camera.\n   - Person’s face visible with natural eye contact.\n   - Absolutely no phones, selfie sticks, or reflections visible.\n\n4. LIGHTING & ENVIRONMENT\n   - Use user-provided setting/scene.\n   - Natural lighting (daylight or golden hour).\n   - Background slightly blurred to achieve shallow depth of field.\n\n5. AUTHENTIC UGC DETAILS\n   - Stray hairs, casual clothing, natural posture.\n   - Candid moment or natural expression.\n   - Avoid artificial or overly edited look.\n\n6. TECHNICAL STYLE\n   - Sharp focus on product + person.\n   - Cinematic shallow depth of field.\n   - Clean, realistic tones.\n\n---------------------------------------\nOUTPUT FORMAT (MANDATORY)\n---------------------------------------\n\nReturn ONLY the prompt text. No brackets, no arrays, no JSON.\n\n---------------------------------------\nSAMPLE OUTPUT\n---------------------------------------\n\nHyper-realistic selfie-style UGC photo featuring a real human influencer holding the EXACT provided product unchanged and accurate. Natural skin texture, visible pores, candid expression, and a realistic hand grip. The product is angled toward the camera in the foreground. Warm daylight fills the scene inside a cozy room. Include stray hair, casual outfit, natural posture. No phone visible. Sharp focus on product and face, softly blurred background.\n\n---------------------------------------\nEND OF SYSTEM PROMPT\n---------------------------------------"
            },
            "promptType": "define"
          },
          "typeVersion": 2.2
        },
        {
          "id": "67d0ac81-93d8-45c2-9e4d-1624b603a04a",
          "name": "Veo Video Prompt",
          "type": "@n8n/n8n-nodes-langchain.agent",
          "position": [
            -112,
            2800
          ],
          "parameters": {
            "text": "=Product: {{ $('Get Pending Videos').item.json.Product }}\nTarget Audience: {{ $('Get Pending Videos').item.json['Target Audience'] }}\nProduct Description: {{ $('Get Pending Videos').item.json['Product Description'] }}\nVideo Instructions: {{ $('Get Pending Videos').item.json['Video Instructions'] }}\nReference Image Description: {{ $json.content }}",
            "options": {
              "systemMessage": "=# System Prompt Template: UGC Selfie Video Creation (8 Seconds)\n\n## Role\nYou are an **expert UGC video creator**.  \nYour task is to **generate a prompt for an AI video model** (such as *Veo 3.1*) based on:\n- The provided **product**\n- The **ideal customer profile (ICP)**\n- **Product features**\n- **Video setting**\n- A **reference image**\n\nYour goal is to create a **realistic, selfie-style video** that appears to be **filmed by an influencer** using one hand to hold the phone and the other to hold or interact with the product. The video should feel **authentic, spontaneous, and natural**, while maintaining **visual and style consistency with the provided reference image**.  \nThe phone itself must **never appear** in the shot.\n\n---\n\n## Requirements\n\n### Subject & Framing\n- The subject is the **ideal user** (from the ICP), **holding or using the product**.\n- The video is recorded **selfie-style** with the **camera held at arm’s length** in one hand and the product in the other.\n- The subject looks directly into the lens while speaking.\n- The video is in **vertical (9:16)** orientation, suitable for TikTok or Instagram Reels.\n\n### Visual Style\n- Use **natural lighting** and **casual, realistic backgrounds** (e.g., bedroom, gym, kitchen, car, office).\n- Include **slight camera shake**, **soft grain**, and **subtle imperfections** for realism.\n- The **product**, **user’s face**, and **interaction** must remain clearly visible.\n- Ensure **no phone, camera, overlays, subtitles, or logos** appear in the frame.\n- The **appearance, colors, and style** should closely **match the provided reference image** (do not include or link the image in the output).\n\n### Tone & Dialogue\n- The subject speaks **1–2 casual, unscripted sentences** about what they personally love about the product.\n- The dialogue should sound **personal, conversational, and genuine** (e.g., “I love how [feature] makes my mornings easier.”).\n- The delivery feels **spontaneous** and **relatable**, not like a polished ad.\n\n### Technical Specs\n- **Duration:** 8 seconds  \n- **Shot Type:** Handheld, selfie-style  \n- **Lighting:** Natural and realistic  \n- **Reference Image:** Used only for **style and consistency matching** (not shown or mentioned)\n\n---\n\n## Embedded Elements in the Prompt\nWhen generating the AI video prompt, include:\n\n- **ICP Persona** → Age, gender, attire, personality, and context  \n- **Product Feature** → One standout feature being praised  \n- **Setting & Lighting** → Realistic environment and lighting cues  \n- **Camera Style** → Handheld selfie, mild shake, natural imperfections  \n- **Reference Image Consistency** → Match appearance and tone  \n- **Tone** → Real, personal, unpolished, influencer-style delivery  \n\n---\n\n## Example Output Prompt\n> “A natural selfie-style 9:16 video filmed by a young woman in a bright kitchen, holding **[Product]** in one hand and her iPhone in the other to record. She smiles at the camera and says, ‘I seriously love how [Product] fits perfectly into my morning routine—it makes breakfast so much faster.’ The product and her face are clearly visible, with natural l\n"
            },
            "promptType": "define"
          },
          "typeVersion": 2.2
        },
        {
          "id": "1ef3a8b6-6fe9-4a66-9822-776955dfb25b",
          "name": "Veo Video",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            224,
            2800
          ],
          "parameters": {
            "url": "https://api.kie.ai/api/v1/veo/generate",
            "method": "POST",
            "options": {},
            "jsonBody": "={\n  \"prompt\": \"{{ $json.output\n  .replace(/\\r?\\n|\\r/g, ' ')\n  .replace(/\"/g, '')\n  .replace(/[“”]/g, '') // removes curly double quotes\n}}\",\n  \"imageUrls\": [\"{{ $('Get New Image URL').item.json.data.url }}\"],\n  \"model\": \"veo3_fast\",\n  \"aspectRatio\": \"9:16\",\n  \"enableTranslation\": true\n}",
            "sendBody": true,
            "specifyBody": "json",
            "authentication": "genericCredentialType",
            "genericAuthType": "httpHeaderAuth"
          },
          "credentials": {
            "httpHeaderAuth": {
              "id": "CJk6wBwuTaqsL3Ij",
              "name": "Kie Auth"
            }
          },
          "typeVersion": 4.2
        },
        {
          "id": "4d87b744-d464-4e8c-93b1-33ab647a41ce",
          "name": "Get Veo Video",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            672,
            2800
          ],
          "parameters": {
            "url": "https://api.kie.ai/api/v1/veo/record-info",
            "options": {},
            "sendQuery": true,
            "authentication": "genericCredentialType",
            "genericAuthType": "httpHeaderAuth",
            "queryParameters": {
              "parameters": [
                {
                  "name": "taskId",
                  "value": "={{ $json.data.taskId }}"
                }
              ]
            }
          },
          "credentials": {
            "httpHeaderAuth": {
              "id": "CJk6wBwuTaqsL3Ij",
              "name": "Kie Auth"
            }
          },
          "typeVersion": 4.2
        },
        {
          "id": "cc793945-57c6-457e-9872-cd9cf245548d",
          "name": "Sticky Note8",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -160,
            1824
          ],
          "parameters": {
            "color": 7,
            "width": 432,
            "height": 352,
            "content": "## Get Product Information And Video Instructions"
          },
          "typeVersion": 1
        },
        {
          "id": "4563013b-d540-49a5-8502-52068762f080",
          "name": "Sticky Note10",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -160,
            2208
          ],
          "parameters": {
            "color": 5,
            "width": 1552,
            "height": 480,
            "content": "## 📷 Generate UGC Image"
          },
          "typeVersion": 1
        },
        {
          "id": "67ef5507-b245-490a-9011-11509201a454",
          "name": "Sticky Note12",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -720,
            2208
          ],
          "parameters": {
            "width": 528,
            "height": 656,
            "content": "# 🛠️ Setup Guide  \n\n**Author: [Sohail Jafri](https://link.thesohailjafri.me/web_ai) | [Youtube](https://link.thesohailjafri.me/yt_ai) | [Instagram](https://link.thesohailjafri.me/ig_ai) | [Join Skool](https://link.thesohailjafri.me/join-skool)**\n\nFollow the steps below to get your AI-powered workflow running smoothly:\n\n### ✅ Step 1: Copy the [Google Sheet Template](https://docs.google.com/spreadsheets/d/1ubwnNzbG1gTGy3fSkjK56w8qi82uL9tqjCs6ccOoROU/copy)  \nMake your own copy and connect it to all the **Google Sheet** nodes inside the workflow. \n\n### ✅ Step 2: Connect Your OpenRouter Model (or AI of Choice)  \nPlug in your [OpenRouter](https://openrouter.ai/) API key—or any compatible model you prefer—to power your agents.\n\n### ✅ Step 3: Add Your [Kie.AI](https://www.kie.ai/) API Key  \nInsert your **Kie.AI** key into all the relevant **HTTP Request** nodes so your agents can retrieve knowledge from Kie.\n\n### ✅ Step 4: Connect Your OpenAI API Key  \nThe **Analyze Image** node uses OpenAI Vision—make sure your **OpenAI API key** is properly configured.\n\n### 💡 Step 5: Start Populating & Testing  \nBegin filling in the **Google Sheet** with test data and run the workflow to see the agents in action.\n"
          },
          "typeVersion": 1
        },
        {
          "id": "b19d93c2-06d2-4a7d-bbc0-597c3a42a7c4",
          "name": "Sticky Note11",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -160,
            2720
          ],
          "parameters": {
            "color": 5,
            "width": 1552,
            "height": 448,
            "content": "## 🎥 Generate UGC Video"
          },
          "typeVersion": 1
        },
        {
          "id": "b9be181c-9731-4e0f-a4ff-86291da0fe84",
          "name": "Get Pending Videos",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            96,
            1936
          ],
          "parameters": {
            "options": {},
            "filtersUI": {
              "values": [
                {
                  "lookupValue": "Pending",
                  "lookupColumn": "Status"
                }
              ]
            },
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": "gid=0",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ubwnNzbG1gTGy3fSkjK56w8qi82uL9tqjCs6ccOoROU/edit#gid=0",
              "cachedResultName": "Sheet1"
            },
            "documentId": {
              "__rl": true,
              "mode": "id",
              "value": "1ubwnNzbG1gTGy3fSkjK56w8qi82uL9tqjCs6ccOoROU"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "TB2tCNqF1GBm2ag8",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "b03a1dc6-13a3-4fd7-9798-4be2120cde1a",
          "name": "Analyze image",
          "type": "@n8n/n8n-nodes-langchain.openAi",
          "maxTries": 2,
          "position": [
            1136,
            2304
          ],
          "parameters": {
            "text": "Describe what is in the image. Describe the environment and the human who is the focus of the image, as well as what the human is holding.",
            "modelId": {
              "__rl": true,
              "mode": "list",
              "value": "chatgpt-4o-latest",
              "cachedResultName": "CHATGPT-4O-LATEST"
            },
            "options": {},
            "resource": "image",
            "imageUrls": "={{ $json.data.url }}",
            "operation": "analyze"
          },
          "credentials": {
            "openAiApi": {
              "id": "tgl6dYfCwAsbUDtk",
              "name": "OpenAi account"
            }
          },
          "retryOnFail": true,
          "typeVersion": 1.8
        },
        {
          "id": "fa86a049-3570-4a7d-8c74-779829a2f8c7",
          "name": "OpenRouter Chat Model",
          "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
          "position": [
            -80,
            3024
          ],
          "parameters": {
            "model": "openai/gpt-5-mini",
            "options": {}
          },
          "credentials": {
            "openRouterApi": {
              "id": "6z6zYFNsqyqFRUEB",
              "name": "OpenRouter account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "4133aa97-571d-40c1-b78d-fbf4e515c4f5",
          "name": "Nano Banana Image Processor",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            224,
            2304
          ],
          "parameters": {
            "url": "https://openrouter.ai/api/v1/chat/completions",
            "method": "POST",
            "options": {},
            "jsonBody": "={\n  \"model\": \"google/gemini-2.5-flash-image\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"{{ $json.output.replace(/\\r?\\n|\\r/g, ' ') }}\"\n        },\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"{{ $('Get Pending Videos').item.json['Product Photo'] }}\"\n          }\n        }\n      ]\n    }\n  ]\n}",
            "sendBody": true,
            "specifyBody": "json",
            "authentication": "predefinedCredentialType",
            "nodeCredentialType": "openRouterApi"
          },
          "credentials": {
            "openRouterApi": {
              "id": "6z6zYFNsqyqFRUEB",
              "name": "OpenRouter account"
            }
          },
          "typeVersion": 4.2
        },
        {
          "id": "3eb2d6ac-e2cd-4783-a4a5-3bdd36230e22",
          "name": "Set Base64",
          "type": "n8n-nodes-base.set",
          "position": [
            448,
            2304
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "92d42d90-c9c7-4535-8efc-a43db58b8927",
                  "name": "base",
                  "type": "string",
                  "value": "={{ $json.choices[0].message.images[0].image_url.url.split(',')[1] }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "9648efc4-dceb-4d06-a88e-64010363d39c",
          "name": "Convert to File",
          "type": "n8n-nodes-base.convertToFile",
          "position": [
            672,
            2304
          ],
          "parameters": {
            "options": {},
            "operation": "toBinary",
            "sourceProperty": "base"
          },
          "typeVersion": 1.1
        },
        {
          "id": "e1814690-11a8-4549-bca8-7cc9ae417863",
          "name": "OpenRouter Chat Model1",
          "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
          "position": [
            -112,
            2544
          ],
          "parameters": {
            "options": {}
          },
          "credentials": {
            "openRouterApi": {
              "id": "6z6zYFNsqyqFRUEB",
              "name": "OpenRouter account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "2ff357a5-1f6c-4648-a6fa-7a4b4b6bd69f",
          "name": "Get New Image URL",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            912,
            2304
          ],
          "parameters": {
            "url": "https://api.imgbb.com/1/upload",
            "method": "POST",
            "options": {},
            "sendBody": true,
            "contentType": "multipart-form-data",
            "authentication": "genericCredentialType",
            "bodyParameters": {
              "parameters": [
                {
                  "name": "image",
                  "parameterType": "formBinaryData",
                  "inputDataFieldName": "data"
                }
              ]
            },
            "genericAuthType": "httpQueryAuth"
          },
          "credentials": {
            "httpQueryAuth": {
              "id": "i16wZHQApYNmkYlF",
              "name": "ImageBB Auth"
            }
          },
          "typeVersion": 4.2
        },
        {
          "id": "cf6897be-1ed6-4d18-903f-275013308608",
          "name": "If Response",
          "type": "n8n-nodes-base.if",
          "position": [
            912,
            2800
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "loose"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "8a2caa94-db0d-4141-ab47-c803e69db7c9",
                  "operator": {
                    "type": "object",
                    "operation": "exists",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json.data.response }}",
                  "rightValue": "success"
                }
              ]
            },
            "looseTypeValidation": true
          },
          "typeVersion": 2.2
        },
        {
          "id": "61812390-fe06-4fac-bebd-fe57a67659c9",
          "name": "Stop and Error",
          "type": "n8n-nodes-base.stopAndError",
          "position": [
            448,
            3024
          ],
          "parameters": {
            "errorMessage": "Error In Video Gen"
          },
          "typeVersion": 1
        },
        {
          "id": "176033f5-c94b-40f0-81c2-a1a9816ddb90",
          "name": "If Error",
          "type": "n8n-nodes-base.if",
          "position": [
            208,
            3040
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "bbfecb71-2978-4d4a-80e7-f839109fb93a",
                  "operator": {
                    "type": "number",
                    "operation": "gte"
                  },
                  "leftValue": "={{ $json.code }}",
                  "rightValue": 400
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "faad6f2b-4d6d-470d-ba54-daefac70d20a",
          "name": "Error Trigger",
          "type": "n8n-nodes-base.errorTrigger",
          "position": [
            352,
            1952
          ],
          "parameters": {},
          "typeVersion": 1
        },
        {
          "id": "84ee7178-2a55-428c-a203-89aa3120ce24",
          "name": "Sticky Note5",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            304,
            1824
          ],
          "parameters": {
            "color": 3,
            "width": 512,
            "height": 352,
            "content": "## 🚨 Error and Loop Control Flow\n---"
          },
          "typeVersion": 1
        },
        {
          "id": "34014147-58bc-4ae2-8a9a-520794b3a3d3",
          "name": "Wait 2 Min",
          "type": "n8n-nodes-base.wait",
          "position": [
            448,
            2800
          ],
          "webhookId": "b049e4b3-7d34-4fec-afc9-185d3a9764fa",
          "parameters": {
            "unit": "minutes",
            "amount": 2
          },
          "typeVersion": 1.1
        },
        {
          "id": "c269ce49-9623-4b71-9f02-0341d985abaf",
          "name": "Update Sheet",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            1168,
            2784
          ],
          "parameters": {
            "columns": {
              "value": {
                "No": "={{ $('Get Pending Videos').item.json.No }}",
                "Status": "Completed",
                "UGC Video": "={{ $json.data.response.resultUrls[0] }}"
              },
              "schema": [
                {
                  "id": "No",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "No",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Product",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Product",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Product Photo",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Product Photo",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Target Audience",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Target Audience",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Product Description",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Product Description",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Video Instructions",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Video Instructions",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Status",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "UGC Video",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "UGC Video",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "row_number",
                  "type": "number",
                  "display": true,
                  "removed": true,
                  "readOnly": true,
                  "required": false,
                  "displayName": "row_number",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "No"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "operation": "update",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": "gid=0",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15WIJkzbXbs-bj8BLaUBDNE8HwUCF1-Z_0MZmKE18byA/edit#gid=0",
              "cachedResultName": "Sheet1"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1ubwnNzbG1gTGy3fSkjK56w8qi82uL9tqjCs6ccOoROU",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ubwnNzbG1gTGy3fSkjK56w8qi82uL9tqjCs6ccOoROU/edit?usp=drivesdk",
              "cachedResultName": "n8n - UGC Video Ad Automation"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "TB2tCNqF1GBm2ag8",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "1a765748-239d-45fb-aae4-86976451190e",
          "name": "Send a message",
          "type": "n8n-nodes-base.gmail",
          "position": [
            576,
            1952
          ],
          "webhookId": "d5abd570-74b9-483b-adfb-8a6044143c8c",
          "parameters": {
            "sendTo": "=john@example.com",
            "message": "=Error: {{ $json.execution.error.message }} Please check workflow {{ $json.execution.url }} Last Node Exe.: {{ $json.execution.lastNodeExecuted }}",
            "options": {},
            "subject": "Error In AI UGC Video Automation"
          },
          "credentials": {
            "gmailOAuth2": {
              "id": "pT69eutSGot4W4td",
              "name": "Gmail account"
            }
          },
          "typeVersion": 2.1
        }
      ],
      "active": false,
      "pinData": {},
      "settings": {
        "executionOrder": "v1"
      },
      "versionId": "31ad4bce-2842-43a7-8b83-dba5eebf3990",
      "connections": {
        "If Error": {
          "main": [
            [
              {
                "node": "Stop and Error",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Wait 2 Min",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Veo Video": {
          "main": [
            [
              {
                "node": "Wait 2 Min",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Set Base64": {
          "main": [
            [
              {
                "node": "Convert to File",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Wait 2 Min": {
          "main": [
            [
              {
                "node": "Get Veo Video",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "If Response": {
          "main": [
            [
              {
                "node": "Update Sheet",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "If Error",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Update Sheet": {
          "main": [
            []
          ]
        },
        "Analyze image": {
          "main": [
            [
              {
                "node": "Veo Video Prompt",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Error Trigger": {
          "main": [
            [
              {
                "node": "Send a message",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get Veo Video": {
          "main": [
            [
              {
                "node": "If Response",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Convert to File": {
          "main": [
            [
              {
                "node": "Get New Image URL",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Schedule Trigger": {
          "main": [
            [
              {
                "node": "Get Pending Videos",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Veo Image Prompt": {
          "main": [
            [
              {
                "node": "Nano Banana Image Processor",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Veo Video Prompt": {
          "main": [
            [
              {
                "node": "Veo Video",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get New Image URL": {
          "main": [
            [
              {
                "node": "Analyze image",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get Pending Videos": {
          "main": [
            [
              {
                "node": "Veo Image Prompt",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "OpenRouter Chat Model": {
          "ai_languageModel": [
            [
              {
                "node": "Veo Video Prompt",
                "type": "ai_languageModel",
                "index": 0
              }
            ]
          ]
        },
        "OpenRouter Chat Model1": {
          "ai_languageModel": [
            [
              {
                "node": "Veo Image Prompt",
                "type": "ai_languageModel",
                "index": 0
              }
            ]
          ]
        },
        "Nano Banana Image Processor": {
          "main": [
            [
              {
                "node": "Set Base64",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    }