{
  "name": "Narrative chaining: AI-generated video scene extensions with Veo3",
  "nodes": [
    {
      "id": "2f784e39-a48f-4836-87f0-87418de5669a",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        2464,
        448
      ]
    },
    {
      "id": "8e3e9280-f1ac-4660-ba8f-113e1e5fc066",
      "name": "GPT",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2528,
        656
      ]
    },
    {
      "id": "f981ea4e-7f0a-4e8b-8c48-1d9be2dee575",
      "name": "Analyze Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1712,
        224
      ]
    },
    {
      "id": "e0846d61-46f3-4c39-90c6-a1dea95e7c7a",
      "name": "Get Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2160,
        224
      ]
    },
    {
      "id": "e1fa982f-1dc3-4838-bcf7-e045196cd061",
      "name": "Looper",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        400
      ]
    },
    {
      "id": "491f212b-8651-4d45-b0bf-bc7e69f20669",
      "name": "If ",
      "type": "n8n-nodes-base.if",
      "position": [
        4304,
        224
      ]
    },
    {
      "id": "055e31c4-3369-4177-9060-20e4deb6b48b",
      "name": "Combine Clips",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5648,
        400
      ]
    },
    {
      "id": "c00b6a56-49d8-4213-9607-73ffa720ce8b",
      "name": "Get Final Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6096,
        400
      ]
    },
    {
      "id": "55af6a77-db7a-4329-ade2-9760808a2bc0",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        5424,
        400
      ]
    },
    {
      "id": "78188b56-9710-4cbd-abd6-227afe72b2be",
      "name": "Get input",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        816,
        400
      ]
    },
    {
      "id": "e6cfd8e6-bbfe-40cf-b977-2e27781d76f8",
      "name": "Initial Values",
      "type": "n8n-nodes-base.set",
      "position": [
        1264,
        400
      ]
    },
    {
      "id": "ff29427c-9efa-40d1-be92-f3d2e3ac4e4b",
      "name": "Request last",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2960,
        224
      ]
    },
    {
      "id": "4409fe8a-e900-4b4c-9bd6-159c3ae21dac",
      "name": "Get last",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3408,
        224
      ]
    },
    {
      "id": "23e39c46-7f46-48b4-bfc0-5f76bf184d9f",
      "name": "Get Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4080,
        144
      ]
    },
    {
      "id": "9973941e-2f67-4dcd-a641-45757bb6c2bc",
      "name": "Create Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3632,
        224
      ]
    },
    {
      "id": "6734b45c-2cfa-4992-9856-eaa5bc0663c3",
      "name": "Add scene",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4528,
        224
      ]
    },
    {
      "id": "bac15ac5-c0f0-43e7-87bd-8a9c38af25f4",
      "name": "Increment step",
      "type": "n8n-nodes-base.set",
      "position": [
        4752,
        224
      ]
    },
    {
      "id": "d021df59-2754-47f0-8547-5e77b64617ab",
      "name": "If complete",
      "type": "n8n-nodes-base.if",
      "position": [
        4976,
        400
      ]
    },
    {
      "id": "e01481e0-2f85-4235-909d-4817d98f4dcc",
      "name": "Wait 2",
      "type": "n8n-nodes-base.wait",
      "position": [
        3856,
        224
      ]
    },
    {
      "id": "2d0eca0f-6ad4-4403-b590-18e95e2b7e30",
      "name": "Wait 1",
      "type": "n8n-nodes-base.wait",
      "position": [
        3184,
        224
      ]
    },
    {
      "id": "79c04913-3f50-46c7-9913-52fd4d8170e7",
      "name": "Wait ",
      "type": "n8n-nodes-base.wait",
      "position": [
        1936,
        224
      ]
    },
    {
      "id": "4d168fec-e2d8-46fd-9285-aeac41a6f22e",
      "name": "Get scenes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5200,
        400
      ]
    },
    {
      "id": "649b2d92-1036-4de5-bde4-1c81fc4d9eaf",
      "name": "Wait 3",
      "type": "n8n-nodes-base.wait",
      "position": [
        5872,
        400
      ]
    },
    {
      "id": "57b479f9-b82c-49b8-9def-1e46bea290ee",
      "name": "Update log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        6320,
        400
      ]
    },
    {
      "id": "4127d103-89b6-4c4d-94e0-4c116faef6d7",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2592,
        448
      ]
    },
    {
      "id": "2e3d3839-5570-4d71-9794-de9cf6ffd165",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -112
      ],
      "parameters": {
        "width": 5856,
        "height": 176,
        "content": "#  - Veo3 Narrative Chaining \n"
      }
    },
    {
      "id": "02d0b3c3-34f6-46c4-94ae-611e398fa092",
      "name": "Execute",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        592,
        400
      ]
    },
    {
      "id": "57b9077e-f79d-486f-bdc7-c6d2aace61f7",
      "name": "Clear scenes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        400
      ]
    },
    {
      "id": "47a708f9-29cc-4e1c-8afe-23adbfe40624",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 528,
        "height": 1392,
        "content": "Structured Setup Guide: Narrative Chaining with N8N + AI\n\n1. Input Setup\nUse a Google Sheet as the control panel.\nFields required:\nVideo URL (starting clip, ends with .mp4)\nNumber of clips to extend ("
      }
    },
    {
      "id": "7c20a138-35af-4a12-8c22-47e2fc52b07a",
      "name": "Extend AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2384,
        224
      ]
    }
  ],
  "connections": {
    "GPT": {
      "ai_languageModel": [
        [
          {
            "node": "Extend AI Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "If ": {
      "main": [
        [
          {
            "node": "Add scene",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Extend AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait ": {
      "main": [
        [
          {
            "node": "Get Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Looper": {
      "main": [
        [
          {
            "node": "Analyze Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1": {
      "main": [
        [
          {
            "node": "Get last",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2": {
      "main": [
        [
          {
            "node": "Get Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 3": {
      "main": [
        [
          {
            "node": "Get Final Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute": {
      "main": [
        [
          {
            "node": "Get input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get last": {
      "main": [
        [
          {
            "node": "Create Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add scene": {
      "main": [
        [
          {
            "node": "Increment step",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Combine Clips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video": {
      "main": [
        [
          {
            "node": "If ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get input": {
      "main": [
        [
          {
            "node": "Clear scenes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get scenes": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If complete": {
      "main": [
        [
          {
            "node": "Get scenes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Looper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear scenes": {
      "main": [
        [
          {
            "node": "Initial Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video": {
      "main": [
        [
          {
            "node": "Wait 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Analysis": {
      "main": [
        [
          {
            "node": "Extend AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request last": {
      "main": [
        [
          {
            "node": "Wait 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Video": {
      "main": [
        [
          {
            "node": "Wait ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Clips": {
      "main": [
        [
          {
            "node": "Wait 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Increment step": {
      "main": [
        [
          {
            "node": "If complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initial Values": {
      "main": [
        [
          {
            "node": "Looper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extend AI Agent": {
      "main": [
        [
          {
            "node": "Request last",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Final Video": {
      "main": [
        [
          {
            "node": "Update log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Extend AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}