{
  "name": "Cinematic Video Ads Automation",
  "nodes": [
    {
      "parameters": {
        "formTitle": "AI Video Ad Generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Product Description",
              "requiredField": true
            },
            {
              "fieldLabel": "Video Concept",
              "fieldType": "textarea",
              "requiredField": true
            },
            {
              "fieldLabel": "Tagline",
              "requiredField": true
            },
            {
              "fieldLabel": "Product Image",
              "fieldType": "file",
              "multipleFiles": false,
              "requiredField": true
            },
            {
              "fieldLabel": "Brand Logo",
              "fieldType": "file",
              "multipleFiles": false,
              "requiredField": true
            },
            {
              "fieldLabel": "Character Reference",
              "fieldType": "file",
              "multipleFiles": false,
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        -1312,
        -704
      ],
      "id": "e6e6994e-510a-4bf0-9b66-48b723f8d40f",
      "name": "On form submission",
      "webhookId": "c5941a15-1b70-4739-b4b4-c367730582a4"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Ads",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ad_id": "==ROW()-1",
            "product_description": "={{ $('On form submission').item.json['Product Description'] }}",
            "video_concept": "={{ $('On form submission').item.json['Video Concept'] }}",
            "date": "={{ $('On form submission').item.json.submittedAt }}",
            "product_image_url": "={{ $json.data }}",
            "brand_logo_url": "={{ $('Merge').all()[1].json.data }}",
            "tagline": "={{ $('On form submission').item.json.Tagline }}",
            "character_img_url": "={{ $('Merge').all()[2].json.data }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "date",
              "displayName": "date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "ad_id",
              "displayName": "ad_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "product_description",
              "displayName": "product_description",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "video_concept",
              "displayName": "video_concept",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "tagline",
              "displayName": "tagline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "product_image_url",
              "displayName": "product_image_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "brand_logo_url",
              "displayName": "brand_logo_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "character_img_url",
              "displayName": "character_img_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -672,
        -688
      ],
      "id": "88030860-66df-4e78-a5c2-b8723f5bf2cf",
      "name": "New Ad",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Ads",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "date",
              "lookupValue": "={{ $json.date }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -496,
        -688
      ],
      "id": "19876701-5ce7-4bb0-a140-c00fa0bf0845",
      "name": "Get Ad ID",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const text = $input.first().json.output[0].content[0].text;\n\nconst regex = /Scene (\\d+)\\.(\\d+) \\[(PRODUCT|NO_PRODUCT)\\] \\[(PERSON|NO_PERSON)\\]: ([\\s\\S]*?)(?=Scene \\d+\\.\\d+|$)/g;\n\nconst results = [];\nlet match;\n\nwhile ((match = regex.exec(text)) !== null) {\n  results.push({\n    shot: parseInt(match[1]),\n    variation: parseInt(match[2]),\n    scene_id: `Scene ${match[1]}.${match[2]}`,\n    show_product: match[3] === 'PRODUCT' ? 'yes' : 'no',\n    show_person: match[4] === 'PERSON' ? 'yes' : 'no',\n    prompt: match[5].trim()\n  });\n}\n\nreturn results.map(item => ({ json: item }));"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        64,
        -688
      ],
      "id": "9a1cdb54-6523-438c-9b24-0b9192bbe1dd",
      "name": "Split Scenes"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "ad_id": "={{ $('Get Ad ID').item.json.ad_id }}",
            "scene_id": "={{ $json.scene_id }}",
            "prompt": "={{ $json.prompt }}",
            "shot": "={{ $json.shot }}",
            "stage": "pending",
            "show_product": "={{ $json.show_product }}",
            "show_person": "={{ $json.show_person }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "ad_id",
              "displayName": "ad_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "scene_id",
              "displayName": "scene_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "prompt",
              "displayName": "prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "image_url",
              "displayName": "image_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "image_display",
              "displayName": "image_display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "selected",
              "displayName": "selected",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_product",
              "displayName": "show_product",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "show_person",
              "displayName": "show_person",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "shot",
              "displayName": "shot",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "video_prompt",
              "displayName": "video_prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_url",
              "displayName": "video_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        240,
        -688
      ],
      "id": "7615534b-7e5c-4319-90e1-7ccb114fd943",
      "name": "Save Scenes",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.kie.ai/api/v1/jobs/createTask",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"nano-banana-pro\",\n  \"input\": {\n    \"prompt\": {{ JSON.stringify($json.prompt) }},\n    \"image_input\": {{ JSON.stringify($json.image_input) }},\n    \"aspect_ratio\": \"16:9\",\n    \"resolution\": \"1K\",\n    \"output_format\": \"png\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        944,
        -688
      ],
      "id": "d0555a01-046c-4ef7-b0fc-894046a5b1d2",
      "name": "Generate Scene 1 Images1"
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1776,
        -528
      ],
      "id": "82ff54a7-ff0a-465f-a7c0-e990bf9b0365",
      "name": "Wait",
      "webhookId": "51e122f8-4ef7-4015-8c3d-a5944209412f"
    },
    {
      "parameters": {
        "url": "https://api.kie.ai/api/v1/jobs/recordInfo",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_YOUR_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        1296,
        -688
      ],
      "id": "a8c4c3ee-8b7c-4966-b115-39207b529cbd",
      "name": "Check Image"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "22a09706-7615-43e0-b1f6-499ada968369",
              "leftValue": "={{ $json.data.state }}",
              "rightValue": "success",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1504,
        -704
      ],
      "id": "d4f98816-cd90-434a-b516-9e8391a66d39",
      "name": "If1",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "prompt": "={{ $('Save Scenes').item.json.prompt }}",
            "image_url": "={{ $json.data }}",
            "image_display": "==IMAGE(\"{{ $json.data }}\")",
            "stage": "waiting_for_selection"
          },
          "matchingColumns": [
            "prompt"
          ],
          "schema": [
            {
              "id": "ad_id",
              "displayName": "ad_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "scene_id",
              "displayName": "scene_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "prompt",
              "displayName": "prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "image_url",
              "displayName": "image_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "image_display",
              "displayName": "image_display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "selected",
              "displayName": "selected",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_product",
              "displayName": "show_product",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_person",
              "displayName": "show_person",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "shot",
              "displayName": "shot",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_prompt",
              "displayName": "video_prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_url",
              "displayName": "video_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        2288,
        -688
      ],
      "id": "b2b90086-7cbe-45bc-82fd-a7175c248352",
      "name": "Save Images 1",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n  const resultJson = JSON.parse(item.json.data.resultJson);\n  \n  results.push({\n    json: {\n      imageUrl: resultJson.resultUrls[0]\n    }\n  });\n}\n\nreturn results;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1840,
        -688
      ],
      "id": "fc36e528-2c96-4747-8bec-5cf258c15982",
      "name": "Parse URL"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://catbox.moe/user/api.php",
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "reqtype",
              "value": "urlupload"
            },
            {
              "name": "url",
              "value": "={{ $json.imageUrl }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        2064,
        -688
      ],
      "id": "224990bf-4355-47f6-b51e-73f5d6657067",
      "name": "Permant Img Store"
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "event": "rowUpdate",
        "options": {
          "columnsToWatch": [
            "selected"
          ]
        }
      },
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        -1344,
        -176
      ],
      "id": "24fde952-d638-4549-82ab-9fe8d369e067",
      "name": "Google Sheets Trigger",
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "MTa23JS5PJZO9iU6",
          "name": "Google Sheets Trigger account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "a30b1d12-f5bb-4c3c-bb1c-b7e70f0951bc",
              "leftValue": "={{ $json.selected }}",
              "rightValue": "yes",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        -1152,
        -176
      ],
      "id": "e973dae4-b57b-450c-99b3-15545834ac95",
      "name": "Filter"
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        544,
        0
      ],
      "id": "cfccba2e-6c4a-4402-a783-4ebf3ae8da56",
      "name": "Wait1",
      "webhookId": "11d4e8f4-c64a-440f-9f23-7faf109e7d19"
    },
    {
      "parameters": {
        "url": "https://api.kie.ai/api/v1/jobs/recordInfo",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_YOUR_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        128,
        -192
      ],
      "id": "d9d985e5-145f-4b53-87cf-1a79df6d0bfa",
      "name": "Check Image1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "22a09706-7615-43e0-b1f6-499ada968369",
              "leftValue": "={{ $json.data.state }}",
              "rightValue": "success",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        368,
        -176
      ],
      "id": "0df1ce67-cca4-49c1-b6f1-32fad78f1b74",
      "name": "If2"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n  const resultJson = JSON.parse(item.json.data.resultJson);\n  \n  results.push({\n    json: {\n      imageUrl: resultJson.resultUrls[0]\n    }\n  });\n}\n\nreturn results;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        592,
        -176
      ],
      "id": "8b12b105-41d8-436c-ac9e-eb1db5d59817",
      "name": "Parse URL1"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "prompt": "={{ $('Get Next Scene').item.json.prompt }}",
            "image_url": "={{ $json.data }}",
            "image_display": "==IMAGE(\"{{ $json.data }}\")",
            "stage": "waiting_for_selection"
          },
          "matchingColumns": [
            "prompt"
          ],
          "schema": [
            {
              "id": "ad_id",
              "displayName": "ad_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "scene_id",
              "displayName": "scene_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "prompt",
              "displayName": "prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "image_url",
              "displayName": "image_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "image_display",
              "displayName": "image_display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "selected",
              "displayName": "selected",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_product",
              "displayName": "show_product",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_person",
              "displayName": "show_person",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "shot",
              "displayName": "shot",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_prompt",
              "displayName": "video_prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_url",
              "displayName": "video_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1056,
        -160
      ],
      "id": "a9e42f5f-5f0c-4482-8c94-21900f065644",
      "name": "Save Images ",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://catbox.moe/user/api.php",
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "reqtype",
              "value": "urlupload"
            },
            {
              "name": "url",
              "value": "={{ $json.imageUrl }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        832,
        -160
      ],
      "id": "fa87f93c-5bac-4aea-993c-f3c7999e1243",
      "name": "Permant Img Store1"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "50b05015-6dc2-400b-a82f-8452ceb39979",
              "leftValue": "={{ $json.shot }}",
              "rightValue": 1,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            },
            {
              "id": "0cd138eb-f0ee-4eac-9e70-2193e12bf01d",
              "leftValue": "={{ $json.shot }}",
              "rightValue": 6,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        448,
        -688
      ],
      "id": "5469e231-eced-42d8-a775-abdaa6f145ba",
      "name": "Filter1"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst characterImage = $('Upload Person Image').first().json.data;\nconst productImage = $('Upload Product Image').first().json.data;\nconst logoImage = $('Upload Brand Image').first().json.data;\n\nreturn items.map(item => {\n  let imageInput = [];\n  \n  // Character NUR wenn show_person = yes\n  if (item.json.show_person === 'yes' && characterImage) {\n    imageInput.push(characterImage);\n  }\n  \n  // Product NUR wenn show_product = yes\n  if (item.json.show_product === 'yes' && productImage) {\n    imageInput.push(productImage);\n  }\n  \n  // Logo NUR für Shot 6\n  if (item.json.shot === 6 && logoImage) {\n    imageInput.push(logoImage);\n  }\n  \n  return {\n    json: {\n      ...item.json,\n      image_input: imageInput\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        656,
        -688
      ],
      "id": "a4cfaa5d-cdde-4c45-b6f3-205f76ca49cf",
      "name": "Build Image Input"
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\n// Character Image aus Ads Sheet\nconst characterImage = $('Get Product Image').first().json.character_img_url;\n// Product URL aus Ads Sheet\nconst productImage = $('Get Product Image').first().json.product_image_url;\n// Logo URL aus Ads Sheet\nconst logoImage = $('Get Product Image').first().json.logo_url;\n// Selected Image aus Filter (vorherige Scene - für Style)\nconst selectedImage = $('Filter').first().json.image_url;\n// Scenes aus \"Get Next Scene\"\nconst scenes = $('Get Next Scene').all();\n\nreturn scenes.map((scene, index) => {\n  let imageInput = [];\n  \n  // 1. Character NUR wenn show_person = yes\n  if (scene.json.show_person === 'yes' && characterImage) {\n    imageInput.push(characterImage);\n  }\n  \n  // 2. Selected Image IMMER (Style-Konsistenz)\n  if (selectedImage) {\n    imageInput.push(selectedImage);\n  }\n  \n  // 3. Product NUR wenn show_product = yes\n  if (scene.json.show_product === 'yes' && productImage) {\n    imageInput.push(productImage);\n  }\n  \n  // 4. Logo NUR für Shot 6\n  if (scene.json.shot === 6 && logoImage) {\n    imageInput.push(logoImage);\n  }\n  \n  return {\n    json: {\n      ...scene.json,\n      image_input: imageInput\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -544,
        -176
      ],
      "id": "58f66431-2872-4b42-b910-7382a1f374bb",
      "name": "Build Image Input1"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Ads",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "ad_id",
              "lookupValue": "={{ $json.ad_id }}"
            }
          ]
        },
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically",
              "readRowsUntil": "firstEmptyRow"
            }
          }
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -768,
        -176
      ],
      "id": "a9c1e3da-551b-406b-9b75-565fd5b854cb",
      "name": "Get Product Image",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "event": "rowUpdate",
        "options": {
          "columnsToWatch": [
            "selected"
          ]
        }
      },
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        -1328,
        432
      ],
      "id": "5e868e8e-7ba1-48f9-88ff-3dc94b968fe0",
      "name": "Google Sheets Trigger1",
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "MTa23JS5PJZO9iU6",
          "name": "Google Sheets Trigger account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "a30b1d12-f5bb-4c3c-bb1c-b7e70f0951bc",
              "leftValue": "={{ $json.shot }}",
              "rightValue": 5,
              "operator": {
                "type": "number",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        -1136,
        432
      ],
      "id": "c6973d8a-f6a1-466d-b120-8ebf627b15b6",
      "name": "Filter2"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "ad_id",
              "lookupValue": "={{ $json.ad_id }}"
            },
            {
              "lookupColumn": "selected",
              "lookupValue": "=yes"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -944,
        432
      ],
      "id": "6adefbcb-0f41-4089-926e-79eba96c0a80",
      "name": "Get row(s) in sheet1",
      "executeOnce": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-5.1",
          "mode": "list",
          "cachedResultName": "GPT-5.1"
        },
        "responses": {
          "values": [
            {
              "content": "=Convert this image prompt to a SHORT video prompt (max 50 words):\n\nRULES:\n1. Start with shot type + main subject ONLY (1 sentence)\n2. Add lighting description (1 short sentence)\n3. Describe what is MOVING (wind, particles, water, camera, etc.)\n4. Add ONE camera movement: \"The camera slowly pushes forward\" or \"The camera pans left\" etc.\n5. End with style + timing: \"National Geographic style, slow motion\" or \"Cinematic, real-time\"\n6. Add audio description: ONLY natural/ambient sounds matching the scene (water bubbles, wind, rustling, footsteps, etc.) - NO music\n\nFORBIDDEN - NEVER include these:\n- Lens specs (35mm, anamorphic, 8k)\n- Film/grain references\n- Color grading terms\n- Abstract words (isolation, scale, meditative, haunting)\n- IMAX references\n- Brand names (Rolex, Nike, Apple, etc.)\n- Shipwreck, wreck, crash, ruins, disaster, destruction\n- Weapons, violence, death, blood\n- Any background/environment details\n- Music or soundtrack references\n\nCRITICAL: The start frame image already shows the full scene. You are ONLY describing movement and camera - NOT the scene itself. Remove ALL nouns describing locations or objects except the main subject.\n\nEXAMPLE:\nBAD: \"Wide shot of a diver hovering above a shipwreck on the ocean floor\"\nGOOD: \"Wide shot of a diver. Sunlight filters through water. Bubbles drift upward. The camera slowly pushes forward. Cinematic, slow motion. Audio: muffled underwater ambience and soft bubbling.\"\n\nImage Prompt:\n{{ $json.prompt }}\n\nOutput only the video prompt. Maximum 50 words."
            }
          ]
        },
        "simplify": false,
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.1,
      "position": [
        -768,
        432
      ],
      "id": "9a3f5f50-65b8-4359-9f8e-9f3d280be622",
      "name": "Generate Video Prompts",
      "credentials": {
        "openAiApi": {
          "id": "80b8DOj8REc2MMqi",
          "name": "OpenAi account 9"
        }
      }
    },
    {
      "parameters": {
        "amount": 60
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        528,
        480
      ],
      "id": "4b3d5ecd-7f43-4020-bee3-4d2a8e86ac7b",
      "name": "Wait2",
      "webhookId": "e50cf5f3-72d2-488d-b811-3f0e803bc5bb"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.kie.ai/api/v1/veo/generate",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"prompt\": \"{{ $json.output[0].content[0].text }}\",\n  \"imageUrls\": [\"{{ $('Get row(s) in sheet1').item.json.image_url }}\"],\n  \"model\": \"veo3_fast\",\n  \"aspectRatio\": \"16:9\",\n\"enableFallback\": true\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -352,
        432
      ],
      "id": "7b19de20-827a-4d1b-8427-350a0aac1346",
      "name": "Generate Videos",
      "executeOnce": false
    },
    {
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/record-info",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_YOUR_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -48,
        432
      ],
      "id": "04588b86-1eb9-43c6-82cd-67faa162011a",
      "name": "Check Video"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://catbox.moe/user/api.php",
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "reqtype",
              "value": "urlupload"
            },
            {
              "name": "url",
              "value": "={{ $json.data.response.resultUrls[0] }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        928,
        368
      ],
      "id": "6b6e4a79-9a28-439d-a10c-60229e1f7ef2",
      "name": "Upload Video"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.data.successFlag }}",
                    "rightValue": 1,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    },
                    "id": "4956ea0f-9fd5-46e5-a623-822b47b5465a"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "success"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "dcbdb85d-4d92-4c15-ac09-fe6af4b959cd",
                    "leftValue": "={{ $json.data.successFlag }}",
                    "rightValue": 0,
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "waiting"
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.3,
      "position": [
        160,
        432
      ],
      "id": "83d96703-348f-46a3-84f7-0f3edaf67b58",
      "name": "Switch"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "prompt": "={{ $('Get row(s) in sheet1').item.json.prompt }}",
            "video_prompt": "={{ $('Generate Video Prompts').item.json.output[0].content[0].text }}",
            "video_url": "generate_manually"
          },
          "matchingColumns": [
            "prompt"
          ],
          "schema": [
            {
              "id": "ad_id",
              "displayName": "ad_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "scene_id",
              "displayName": "scene_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "prompt",
              "displayName": "prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "image_url",
              "displayName": "image_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "image_display",
              "displayName": "image_display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "selected",
              "displayName": "selected",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_product",
              "displayName": "show_product",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "shot",
              "displayName": "shot",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_prompt",
              "displayName": "video_prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "video_url",
              "displayName": "video_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        336,
        528
      ],
      "id": "bf809e89-d85a-4448-8f4a-fa639921de67",
      "name": "Send Info",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\n\nreturn items.map(item => {\n  return {\n    json: {\n      ...item.json,\n      video_url: item.json.data.response.resultUrls[0]\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        688,
        368
      ],
      "id": "30bb9f9d-7aff-46e5-b99f-d099ae804459",
      "name": "Parse URL2"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "prompt": "={{ $('Get row(s) in sheet1').item.json.prompt }}",
            "video_prompt": "={{ $('Generate Video Prompts').item.json.output[0].content[0].text }}",
            "video_url": "={{ $json.data }}"
          },
          "matchingColumns": [
            "prompt"
          ],
          "schema": [
            {
              "id": "ad_id",
              "displayName": "ad_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "scene_id",
              "displayName": "scene_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "prompt",
              "displayName": "prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "image_url",
              "displayName": "image_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "image_display",
              "displayName": "image_display",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "selected",
              "displayName": "selected",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "show_product",
              "displayName": "show_product",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "stage",
              "displayName": "stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "shot",
              "displayName": "shot",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "video_prompt",
              "displayName": "video_prompt",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "video_url",
              "displayName": "video_url",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1136,
        368
      ],
      "id": "fa0c833e-edaf-45c6-b2d8-d1f5c97c2139",
      "name": "Save Images 2",
      "executeOnce": false,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://catbox.moe/user/api.php",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "reqtype",
              "value": "fileupload"
            },
            {
              "parameterType": "formBinaryData",
              "name": "fileToUpload",
              "inputDataFieldName": "Product_Image"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -1056,
        -832
      ],
      "id": "b1cacaf6-e304-49ad-9139-e37153ca7ffc",
      "name": "Upload Product Image"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://catbox.moe/user/api.php",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "reqtype",
              "value": "fileupload"
            },
            {
              "parameterType": "formBinaryData",
              "name": "fileToUpload",
              "inputDataFieldName": "Brand_Logo"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -1056,
        -672
      ],
      "id": "d9f4e02c-6f31-47c8-9b8a-c950efa8a272",
      "name": "Upload Brand Image"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -864,
        -688
      ],
      "id": "70e4863c-9206-4a06-a461-864245cd1686",
      "name": "Merge"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-5.1",
          "mode": "list",
          "cachedResultName": "GPT-5.1"
        },
        "responses": {
          "values": [
            {
              "content": "=You are an AI storyboard generator.\n\nYour task is to create a 6 shot cinematic storyboard for a video ad based on these inputs:\n- Product: {{ $('On form submission').item.json['Product Description'] }}\n- Video Concept: {{ $('On form submission').item.json['Video Concept'] }}\n- Tagline: {{ $('On form submission').item.json['Tagline'] }}\n\n========================\nEXAMPLE STORYBOARD OUTPUT\n========================\n\nShot 1: The Descent\n\nThe Cinematic Wide: An ultra-wide cinematic shot of a lone diver descending into a deep, dark blue abyss. Rays of sunlight penetrate the water from above, fading into darkness. A massive, silhouetted shipwreck looms at the bottom. 35mm film grain, teal and black palette, sense of scale and isolation, shot on IMAX.\nThe Top-Down Thriller: High-angle top-down shot looking into the deep ocean. A tiny scuba diver with a faint light descends toward a massive, ghostly shadow of a galleon on the sea floor. Deep indigo water, volumetric lighting, terrifying sense of depth, Thalassophobia aesthetic, 8k resolution, photorealistic.\nThe Light Shafts: Low-angle shot looking up at the diver. The diver is a silhouette against the shimmering surface light. God rays cut through the murky water. Particles floating in suspension. Dreamy atmosphere, anamorphic lens flare, deep aquatic blues.\nThe Close Follow: Over-the-shoulder shot of a scuba diver. Focus on regulator and rising bubbles. In the blurred background, the jagged outline of a shipwreck emerges. Macro details on bubbles, claustrophobic mood, heavy contrast.\nThe Sonar Blue: A moody stylized shot of the descent. Water is deep royal blue. The wreck is barely visible, illuminated by the diver's distant torch. Mystery thriller feel, dramatic lighting, shot on Arri Alexa.\n\nShot 2: The Graveyard\n\nThe Textural Detail: Medium shot of diver exploring ancient shipwreck ribs. Rotten wood covered in barnacles, rust, and silt. Sharp scuba flashlight beam reveals texture. Dust floating in water. Hyper realistic, 85mm lens, documentary style.\nThe Murky Gloom: Wide shot of diver near the skeletal hull. Greenish-blue murky water. Diver's light creates a tyndall beam through silt. Haunting atmosphere, cinematic grading.\nThe Abstract Wreckage: Close-up of a rusted anchor half-buried in sand. Diver blurred in background. Scene lit only by flashlight spill. Cold color temperature, dramatic shadows.\nThe Search: Tracking shot of diver swimming past rotting hull. Light reveals clouds of sediment. Dramatic contrast, 35mm Fujifilm look.\nThe Horror Vibe: Low angle through broken ribs of ship. Diver's flashlight creates a massive lens flare. Deep shadows, ominous atmosphere.\n\nShot 3: The Discovery\n\nThe Action Freeze: Close-up of gloved hand hitting sand. Silt explodes outward in slow motion. Gold partially visible. High shutter speed look.\nThe Gentle Reveal: Extreme close-up of fingers brushing dust away to reveal gold bracelet links. Soft intimate lighting.\nThe Cloud of Dust: Hand reaches into sediment. Thick swirling dust clouds. Warm gold glow visible beneath. Atmospheric.\nThe Contrast: Top-down close-up. Dark glove moves sand aside revealing gold. High contrast commercial style.\nThe Grip: Hand digs into debris. Rust flakes and sand float. Object being uncovered. Tension and anticipation.\n\nShot 4: The Reveal\n\nThe Hero Shot: Extreme close-up of pristine gold watch in sand. Blue dial catches underwater light. Luxury ad photography style.\nThe Ancient Contrast: Top-down shot of watch half-buried in rotten wood. Warm vs cool color contrast. High dynamic range.\nThe Side Profile: Macro low angle of watch case and crown. Tiny sea creature for scale. Glowing gold tones.\nThe Vertical Light: Single shaft of light hits the watch like a spotlight. Minimalist dramatic composition.\nThe Gleaming Bezel: Ultra macro focus on gold bezel and sapphire crystal with bubbles. Hyper realistic reflections.\n\nShot 5: The Legacy\n\nThe Silhouette Triumph: Silhouette of diver holding watch toward the surface light. Epic scale.\nThe Clutch: Close-up of hand gripping the watch as debris falls off. Victory and discovery feel.\nThe Fading Light: Watch held in center with background fading to dark edges. Last glint of gold.\nThe Treasure Hunter: Diver inspects watch near mask. Reflection visible in visor.\nThe Solo Object: Watch lifted into clear water. Clean deep blue background, hero product shot.\n\nShot 6: The End Card\n\nThe Luxury Finale: Static end card. Blurred, darkened background inspired by the previous underwater scene. Product prominently centered with dramatic lighting. Clean space at top for brand logo. Tagline \"Time Never Stops\" elegantly placed at bottom. High contrast between product and background. Premium luxury advertising style.\nThe Minimal Statement: Static end card. Soft gradient background matching the color palette of the underwater scenes. Product floating center frame with subtle shadow. Brand logo positioned top center. Tagline \"Time Never Stops\" in elegant typography at bottom. Clean, sophisticated advertising aesthetic.\nThe Dark Elegance: Static end card. Deep dark background with subtle scene elements faded in corners. Product hero shot with rim lighting. Brand logo glowing softly at top. Tagline \"Time Never Stops\" with premium serif font at bottom. Cinematic luxury feel.\nThe Brand Moment: Static end card. Abstract blurred background from scene environment. Product in sharp focus, perfectly centered. Large brand logo at top with breathing room. Tagline \"Time Never Stops\" anchored at bottom third. Commercial advertising end frame style.\nThe Premium Close: Static end card. Vignette background fading from scene colors to black at edges. Product glamour shot with catchlight reflections. Brand logo clean and prominent at top. Tagline \"Time Never Stops\" as final statement at bottom. High-end watch advertisement aesthetic.\n\n========================\nEND OF EXAMPLE\n========================\n\nOUTPUT RULES:\n1. Create 6 shots total, labeled Shot 1 to Shot 6.\n2. Each shot must NOT include any title.\n3. Shots 1-5 must include exactly 5 variations each.\n4. Shot 6 (End Card) must include exactly 5 variations - all static images for branding.\n\n5. For each scene, decide:\n   - Is a PERSON visible? (face, body, silhouette) → mark [PERSON] or [NO_PERSON]\n   - Is the PRODUCT visible? → mark [PRODUCT] or [NO_PRODUCT]\n\n6. Only output this exact format:\n\nScene X.Y [PRODUCT/NO_PRODUCT] [PERSON/NO_PERSON]: {prompt}\n\nWhere:\n- X is the shot number (1 to 6)\n- Y is the variation number (1 to 5)\n- [PRODUCT] = the product is visible / [NO_PRODUCT] = product not visible\n- [PERSON] = a person is visible / [NO_PERSON] = no person visible\n\nExamples:\nScene 1.1 [NO_PRODUCT] [PERSON]: A woman sits at a vanity table...\nScene 3.2 [PRODUCT] [NO_PERSON]: Close-up of perfume bottle on marble...\nScene 4.1 [PRODUCT] [PERSON]: Woman holds the bottle close to her face...\n\n7. Each prompt must be visually rich and cinematic. Include:\ncamera details, lens, lighting, mood, textures, color palette, atmosphere, composition.\n\n8. For Shot 6 End Cards, include the actual tagline text in the prompt.\n\n9. Do not add commentary. Output only the storyboard in the required structure.\n\n10. Match the example's style and detail, but generate fully new content based on the product description and video concept.\n\n11. SCENE CONTINUITY: Each shot must flow naturally from the previous one. The last variation of each Shot must visually connect to the first variation of the next Shot. No sudden jumps in action, position, or framing. Think of it like a real video - each scene continues exactly where the last one ended.\n\n12. CHARACTER CONSISTENCY: If your concept includes a person, describe them with the EXACT same details (hair, clothing, features) in every scene where they appear.\n\n13. VIDEO GENERATION SAFETY: Avoid words that trigger AI content filters. \n\nNEVER use these words in prompts:\n- Explosion, explode, exploding\n- Fire, flames, burning\n- Crash, collision, impact\n- Destruction, destroy\n- Violence, fight, attack\n- Blood, injury, death\n- Weapons, guns, knives\n- Disaster, catastrophe\n- Wreck, wreckage, shipwreck\n- Smoke, smoking\n\nREPLACE with safe alternatives:\n- \"explodes in color\" → \"bursts into color\"\n- \"fire\" → \"warm glow\" or \"golden light\"\n- \"crash\" → \"arrive suddenly\"\n- \"shipwreck\" → \"ancient vessel\" or \"sunken structure\"\n- \"smoke\" → \"mist\" or \"haze\"\n\nKeep prompts visually dramatic but use safe, neutral language.\n\n14. CHARACTER CLOTHING: Do NOT describe specific clothing in the prompts. Only describe:\n- Age\n- Hair color/style\n- Facial features (beard, etc.)\n- Body position/pose\n- Action\n\nThe character reference image will provide the exact clothing. If you describe clothing, it will conflict with the reference image.\n\nWRONG: \"A man in olive-green jacket and black pants...\"\nRIGHT: \"A man with short brown hair and trimmed beard...\""
            }
          ]
        },
        "simplify": false,
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.1,
      "position": [
        -288,
        -688
      ],
      "id": "4203ed94-aeff-4488-a7d2-acea35ab5200",
      "name": "Generate Image Prompts",
      "credentials": {
        "openAiApi": {
          "id": "80b8DOj8REc2MMqi",
          "name": "OpenAi account 9"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://catbox.moe/user/api.php",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "reqtype",
              "value": "fileupload"
            },
            {
              "parameterType": "formBinaryData",
              "name": "fileToUpload",
              "inputDataFieldName": "Character_Reference"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -1056,
        -496
      ],
      "id": "7efdbc26-a0c3-4b3f-baa4-735ba0e24d5f",
      "name": "Upload Person Image"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.kie.ai/api/v1/jobs/createTask",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"nano-banana-pro\",\n  \"input\": {\n    \"prompt\": {{ JSON.stringify($('Get Next Scene').item.json.prompt) }},\n    \"image_input\": {{ JSON.stringify($json.image_input) }},\n    \"aspect_ratio\": \"16:9\",\n    \"resolution\": \"1K\",\n    \"output_format\": \"png\"\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        -304,
        -176
      ],
      "id": "ffeeba0b-bffe-4432-90e6-26fc6bf6b836",
      "name": "Generate Scenes Images"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg",
          "mode": "list",
          "cachedResultName": "Nano Banana Pro Director",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 1071403824,
          "mode": "list",
          "cachedResultName": "Scenes",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DwVjwiJE81ogItwCYW5h4LChJizuhFkLWRX3HKp9nDg/edit#gid=1071403824"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "ad_id",
              "lookupValue": "={{ $json.ad_id }}"
            },
            {
              "lookupColumn": "shot",
              "lookupValue": "={{ $('Filter').item.json.shot + 1 }}"
            }
          ]
        },
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically",
              "readRowsUntil": "firstEmptyRow"
            }
          }
        }
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        -976,
        -176
      ],
      "id": "daf69e4b-71ea-435d-8bf1-76d570997f64",
      "name": "Get Next Scene",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "uJs2j7wVby6KZmho",
          "name": "Google Sheets account 9"
        }
      }
    },
    {
      "parameters": {
        "content": "## Generating Images for Scene 1 and Scene 6 (End Screen)",
        "height": 640,
        "width": 3904
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1392,
        -928
      ],
      "id": "2e15046e-636a-4452-9f6d-c4d94925b200",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Subsequent Images Generation for Scene 2 - Scene 5",
        "height": 512,
        "width": 2720,
        "color": 2
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1392,
        -256
      ],
      "id": "afa75a6a-4cd7-45a1-8640-1b924c2bbe68",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Video Generation for Scene 1 - Scene 5",
        "height": 448,
        "width": 2720,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1392,
        320
      ],
      "id": "750df6d1-ab02-4ddb-b04b-a98562196550",
      "name": "Sticky Note2"
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Upload Product Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload Brand Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload Person Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Ad": {
      "main": [
        [
          {
            "node": "Get Ad ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Scenes": {
      "main": [
        [
          {
            "node": "Save Scenes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Ad ID": {
      "main": [
        [
          {
            "node": "Generate Image Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Scenes": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Scene 1 Images1": {
      "main": [
        [
          {
            "node": "Check Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Check Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Image": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Parse URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse URL": {
      "main": [
        [
          {
            "node": "Permant Img Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Permant Img Store": {
      "main": [
        [
          {
            "node": "Save Images 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Get Next Scene",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Images 1": {
      "main": [
        []
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Check Image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Image1": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Parse URL1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Images ": {
      "main": [
        []
      ]
    },
    "Permant Img Store1": {
      "main": [
        [
          {
            "node": "Save Images ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse URL1": {
      "main": [
        [
          {
            "node": "Permant Img Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Build Image Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Image Input": {
      "main": [
        [
          {
            "node": "Generate Scene 1 Images1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Image Input1": {
      "main": [
        [
          {
            "node": "Generate Scenes Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Product Image": {
      "main": [
        [
          {
            "node": "Build Image Input1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger1": {
      "main": [
        [
          {
            "node": "Filter2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter2": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "Generate Video Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Check Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Prompts": {
      "main": [
        [
          {
            "node": "Generate Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Videos": {
      "main": [
        [
          {
            "node": "Check Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Parse URL2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse URL2": {
      "main": [
        [
          {
            "node": "Upload Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video": {
      "main": [
        [
          {
            "node": "Save Images 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Product Image": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Brand Image": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "New Ad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image Prompts": {
      "main": [
        [
          {
            "node": "Split Scenes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Person Image": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Generate Scenes Images": {
      "main": [
        [
          {
            "node": "Check Image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Next Scene": {
      "main": [
        [
          {
            "node": "Get Product Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e25241af-52c3-4c5f-b4e7-bf4e0bc8d136",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7ff6625f0127f3e9a7865e3493009de1c48f57dc5ed87def3ae3316be7f6b238"
  },
  "id": "C6GyKUTusspAQhsd",
  "tags": []
}