{
  "name": "Generate UGC-style video ads of any length with Kie, Claude, GPT-4o and Google Sheets",
  "nodes": [
    {
      "id": "d89322eb-8d39-4e43-81a6-5c5e851ba92b",
      "name": "Get Video Ideas",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7808,
        480
      ]
    },
    {
      "id": "6994d18f-8ffb-4f78-9f24-ff172b73fca7",
      "name": "HTTP Request12",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -7552,
        1728
      ]
    },
    {
      "id": "8652d395-55d2-42a9-a379-68c14272c501",
      "name": "HTTP Request13",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -7376,
        1728
      ]
    },
    {
      "id": "0148cb0b-b080-46dd-9b60-e055dcb1388e",
      "name": "Wait6",
      "type": "n8n-nodes-base.wait",
      "position": [
        -7200,
        1888
      ]
    },
    {
      "id": "fe407dbe-fa9f-4d53-a4df-106be370ccd9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8960,
        336
      ],
      "parameters": {
        "width": 768,
        "height": 816,
        "content": "                                                                                                                                                           \n  # UGC Ads Factory                         "
      }
    },
    {
      "id": "0559e237-00ff-4efe-a47e-36c8af909baf",
      "name": "Video Status Check",
      "type": "n8n-nodes-base.switch",
      "position": [
        -7200,
        1696
      ]
    },
    {
      "id": "4b470e1c-d761-4d7d-b1be-b52222135c20",
      "name": "Prompt Agent LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -7488,
        704
      ]
    },
    {
      "id": "5c6d334c-8555-4459-812e-b495955719c7",
      "name": "Prompt Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -7344,
        704
      ]
    },
    {
      "id": "0b88243e-35a0-48ed-8642-7eb2fd553a23",
      "name": "Image Gen Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -5696,
        1904
      ]
    },
    {
      "id": "757ee7c8-04b1-44a2-bdc5-2bc952ea21e8",
      "name": "Script Agent LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -5456,
        592
      ]
    },
    {
      "id": "f5fdbb5e-0f2d-4d74-a869-c86aa65fe6b2",
      "name": "Scene Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -5280,
        592
      ]
    },
    {
      "id": "a40e50b2-5f5c-4b7b-9e94-e3730408f4e3",
      "name": "Nano Banana Prompt Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -7488,
        480
      ]
    },
    {
      "id": "087b06f3-bed6-4e82-9c49-2652143803bd",
      "name": "Generate UGC Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -7104,
        480
      ]
    },
    {
      "id": "c0d40d1a-ad66-4c7a-a1bb-ebe2e6c589d5",
      "name": "Image Gen Response Check",
      "type": "n8n-nodes-base.switch",
      "position": [
        -6912,
        464
      ]
    },
    {
      "id": "e9040eb0-e298-4cb5-b8a2-e021476905a3",
      "name": "Workflow Configuration3",
      "type": "n8n-nodes-base.set",
      "position": [
        -5792,
        400
      ]
    },
    {
      "id": "3f7fdefa-aefa-40f1-b2cc-3d7a97a35655",
      "name": "Split Scenes",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -5168,
        400
      ]
    },
    {
      "id": "fe848a2d-d4ef-4015-839c-2107b9ad6250",
      "name": "Analyze UGC Image3",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -5600,
        400
      ]
    },
    {
      "id": "eef8c19c-57b7-4b3b-995d-f642cfa394fe",
      "name": "Generate Scene Scripts3",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -5456,
        400
      ]
    },
    {
      "id": "5307f0e6-a123-43b9-8d77-b4fbb75cb652",
      "name": "Input",
      "type": "n8n-nodes-base.set",
      "position": [
        -7648,
        480
      ]
    },
    {
      "id": "8dc23647-0633-47cf-942c-755cc4b9f94c",
      "name": "videoInput",
      "type": "n8n-nodes-base.set",
      "position": [
        -7728,
        1728
      ]
    },
    {
      "id": "160418ac-08be-4a9d-beb2-cd1074379038",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -6960,
        1680
      ]
    },
    {
      "id": "79ed8983-c1ca-4b49-aa0f-742f443de5b4",
      "name": "Wait 10s",
      "type": "n8n-nodes-base.wait",
      "position": [
        -6480,
        608
      ]
    },
    {
      "id": "d9a1c791-c535-4cd2-a6e5-a878aa144df3",
      "name": "Image Poll Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -6480,
        864
      ]
    },
    {
      "id": "210cb9ec-6c71-4673-8818-14fa28cb34c3",
      "name": "Poll Image Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -6640,
        448
      ]
    },
    {
      "id": "06526cb8-8aba-47bb-aefe-6553420fe5b1",
      "name": "Image Status Check",
      "type": "n8n-nodes-base.switch",
      "position": [
        -6480,
        416
      ]
    },
    {
      "id": "9ece6252-e993-493b-9dea-6e4dd721e6b9",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -6080,
        400
      ]
    },
    {
      "id": "99701b3a-4f09-4071-b787-1643a5353309",
      "name": "Download Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -6208,
        400
      ]
    },
    {
      "id": "dc6b25d5-23de-4609-b1c6-7f3f83065d75",
      "name": "Share file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -5952,
        400
      ]
    },
    {
      "id": "a24f13cb-c7af-4452-8c90-28d2d8ba7bdb",
      "name": "UpdateSheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -5008,
        400
      ]
    },
    {
      "id": "ebb29036-8a05-4fce-8bb5-d233b87de2e2",
      "name": "UpdateSheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -4720,
        864
      ]
    },
    {
      "id": "dca509d8-8d78-4be5-aefb-9addf3debc47",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7872,
        1728
      ]
    },
    {
      "id": "cdcd3e51-a210-4a4d-8b58-d6a095fc85eb",
      "name": "Upload file1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -6784,
        1680
      ]
    },
    {
      "id": "3bda72be-7bf7-425b-8fa0-e262c5452cb1",
      "name": "Share file1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -6640,
        1680
      ]
    },
    {
      "id": "6aee447c-c1f3-418d-9c3b-eb661161f707",
      "name": "UpdateSheet2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -6464,
        1680
      ]
    },
    {
      "id": "98e90d5c-382b-4017-b8e7-b8a958360bd2",
      "name": "Get row(s) for Stitch",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -6272,
        1680
      ]
    },
    {
      "id": "09d31ad8-e2fb-47d9-9bc4-7c7f72346821",
      "name": "Sort",
      "type": "n8n-nodes-base.sort",
      "position": [
        -5696,
        1600
      ]
    },
    {
      "id": "a44712c4-c5b4-4915-a42e-6bbecbf150c7",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -6080,
        1680
      ]
    },
    {
      "id": "9e26a0ce-0a75-41d3-92e0-e774afccf9a6",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -5872,
        1680
      ]
    },
    {
      "id": "81261d3e-c2d1-44c4-a396-54c225b9a9a2",
      "name": "download-video8",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -5104,
        1600
      ]
    },
    {
      "id": "65fc1067-2502-460a-aad9-0f4f4afb930d",
      "name": "Upload file2",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -4864,
        1600
      ]
    },
    {
      "id": "6ad7af35-7562-448c-a703-80194c105b5e",
      "name": "Share file2",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -4720,
        1600
      ]
    },
    {
      "id": "fdcb362c-2d19-40b6-9fb4-7eb3368668e0",
      "name": "UpdateSheet3",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -4544,
        1600
      ]
    },
    {
      "id": "3485451a-578b-44d9-8d40-1285ffc9efae",
      "name": "UpdateSheet4",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7024,
        1536
      ]
    },
    {
      "id": "620a7998-2728-493f-bc9d-1d47cec9b75a",
      "name": "UpdateSheet5",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -6640,
        864
      ]
    },
    {
      "id": "51ca2822-d0f9-4765-bc22-9b550b5b890e",
      "name": "Get row(s) in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7808,
        2128
      ]
    },
    {
      "id": "484a7936-49f2-4cee-9fe5-e124e85d0ccf",
      "name": "UpdateSheet9",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -6752,
        1536
      ]
    },
    {
      "id": "066c8865-8258-455c-8d19-d29c1baf1344",
      "name": "UpdateSheet10",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7552,
        1584
      ]
    },
    {
      "id": "682390d8-a9fd-432d-bc98-fc99740f9e80",
      "name": "Code in JavaScript2",
      "type": "n8n-nodes-base.code",
      "position": [
        -7664,
        2128
      ]
    },
    {
      "id": "39e38150-6ceb-41b8-a587-f79001f5170e",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -7968,
        2128
      ]
    },
    {
      "id": "f13aa6a8-8294-492c-b8e6-04c6fa0453c4",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -8032,
        592
      ]
    },
    {
      "id": "fa732387-c0cb-430e-95f9-a740a0c6f899",
      "name": "Generate media using AI model1",
      "type": "@fal-ai/n8n-nodes-fal.falAi",
      "position": [
        -5312,
        1600
      ]
    },
    {
      "id": "bbb382bb-50c6-4313-8db2-cd7a9e25f081",
      "name": "Aggregate Tempfile URLs2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -5520,
        1600
      ]
    },
    {
      "id": "5672a358-6193-4b7e-8533-f5fda2d35a3c",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -4848,
        400
      ]
    },
    {
      "id": "f6f9ffab-6f78-4abb-b179-67c75b6d611c",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -6896,
        1536
      ]
    },
    {
      "id": "708b799d-c34b-4382-b31f-05dcad8d9e89",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -8032,
        384
      ]
    },
    {
      "id": "0ef2e4d2-3760-47f1-a842-c5b6562a9882",
      "name": "UpdateSheet6",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7648,
        352
      ]
    },
    {
      "id": "c973625b-0e07-4728-97f8-d262ac6b3f35",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8112,
        256
      ],
      "parameters": {
        "width": 1856,
        "height": 208,
        "content": "  ## Intake + Image Generation                                                                                                                                                                          "
      }
    },
    {
      "id": "c2f80dcd-3fc2-42d2-afbf-d7d51a96f2fc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6032,
        256
      ],
      "parameters": {
        "width": 1344,
        "height": 192,
        "content": "  ## Script Generation                                                                                                                                                                                  "
      }
    },
    {
      "id": "725a758a-dfa9-420e-bc86-cb3065364d76",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8080,
        1472
      ],
      "parameters": {
        "width": 1920,
        "height": 256,
        "content": "## Video Generation                                                                                                                                                                                     "
      }
    },
    {
      "id": "c8d6f7f0-59fb-470e-87cd-2ddb9c29665d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5952,
        1424
      ],
      "parameters": {
        "width": 1488,
        "height": 208,
        "content": "## Video Generation                                                                                                                                                                                     "
      }
    },
    {
      "id": "b713101c-0a0d-4730-b60d-482f96472960",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8000,
        2368
      ],
      "parameters": {
        "width": 576,
        "height": 80,
        "content": "## Regeneration of the video"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Image Gen Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "Aggregate Tempfile URLs2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "UpdateSheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input": {
      "main": [
        [
          {
            "node": "Nano Banana Prompt Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "UpdateSheet9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait6": {
      "main": [
        [
          {
            "node": "HTTP Request13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s": {
      "main": [
        [
          {
            "node": "Poll Image Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Share file": {
      "main": [
        [
          {
            "node": "Workflow Configuration3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "videoInput": {
      "main": [
        [
          {
            "node": "HTTP Request12",
            "type": "main",
            "index": 0
          },
          {
            "node": "UpdateSheet10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Share file1": {
      "main": [
        [
          {
            "node": "UpdateSheet2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Share file2": {
      "main": [
        [
          {
            "node": "UpdateSheet3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateSheet": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Share file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Scenes": {
      "main": [
        [
          {
            "node": "UpdateSheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateSheet1": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateSheet2": {
      "main": [
        [
          {
            "node": "Get row(s) for Stitch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateSheet4": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateSheet5": {
      "main": [
        [
          {
            "node": "Image Poll Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file1": {
      "main": [
        [
          {
            "node": "Share file1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file2": {
      "main": [
        [
          {
            "node": "Share file2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Upload file1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request12": {
      "main": [
        [
          {
            "node": "HTTP Request13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request13": {
      "main": [
        [
          {
            "node": "Video Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Ideas": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          },
          {
            "node": "UpdateSheet6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "download-video8": {
      "main": [
        [
          {
            "node": "Upload file2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Agent LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Nano Banana Prompt Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Script Agent LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Scene Scripts3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Poll Image Status": {
      "main": [
        [
          {
            "node": "Image Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Get Video Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze UGC Image3": {
      "main": [
        [
          {
            "node": "Generate Scene Scripts3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate UGC Image": {
      "main": [
        [
          {
            "node": "Image Gen Response Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Status Check": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateSheet5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 10s",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateSheet5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Status Check": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateSheet4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateSheet4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "videoInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "videoInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scene Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Scene Scripts3",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Nano Banana Prompt Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) for Stitch": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Scene Scripts3": {
      "main": [
        [
          {
            "node": "Split Scenes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration3": {
      "main": [
        [
          {
            "node": "Analyze UGC Image3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Tempfile URLs2": {
      "main": [
        [
          {
            "node": "Generate media using AI model1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Gen Response Check": {
      "main": [
        [
          {
            "node": "Poll Image Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateSheet5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UpdateSheet5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nano Banana Prompt Agent": {
      "main": [
        [
          {
            "node": "Generate UGC Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate media using AI model1": {
      "main": [
        [
          {
            "node": "download-video8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Get Video Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}