{
  "name": "Generate multi-pass Seedance AI roto mattes with QC and Nuke handoff",
  "nodes": [
    {
      "id": "608b2521-c170-486d-afe4-574a1f61befe",
      "name": "Validate & Extract Roto Brief",
      "type": "n8n-nodes-base.code",
      "position": [
        1088,
        848
      ]
    },
    {
      "id": "9569062a-9de4-42d5-a0ed-3ddc28ed6b1b",
      "name": "Fan-Out: 4 Roto Passes",
      "type": "n8n-nodes-base.code",
      "position": [
        1328,
        848
      ]
    },
    {
      "id": "d3a59138-cb5c-42ba-9b0a-a36aa78ed0af",
      "name": "Build Roto Request Body",
      "type": "n8n-nodes-base.code",
      "position": [
        1568,
        848
      ]
    },
    {
      "id": "7baac4e5-6415-46c2-a762-cee10a27319b",
      "name": "Seedance: Generate Roto Pass",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1808,
        848
      ]
    },
    {
      "id": "b95ce40f-8d29-4b63-9371-537cfa6741b8",
      "name": "Merge Roto Job ID + Metadata",
      "type": "n8n-nodes-base.code",
      "position": [
        2096,
        848
      ]
    },
    {
      "id": "717b7c5c-8ec3-4f71-89c1-7511c5092d4d",
      "name": "Poll: Check Roto Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2288,
        848
      ]
    },
    {
      "id": "ff98ef77-75e6-444f-bf29-e5fb6e11db30",
      "name": "Wait 20s",
      "type": "n8n-nodes-base.wait",
      "position": [
        2448,
        1184
      ]
    },
    {
      "id": "27cbe4ce-4125-4efe-a824-d78d0ab7cd56",
      "name": "Roto Render Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        2496,
        848
      ]
    },
    {
      "id": "400d4c8d-ad33-4ff9-94bc-432c666b383e",
      "name": "Build Roto Metadata + QC Score",
      "type": "n8n-nodes-base.code",
      "position": [
        2768,
        832
      ]
    },
    {
      "id": "d877dac8-f4eb-4f07-948c-3f19bc194d81",
      "name": "QC Gate: Passes Threshold?",
      "type": "n8n-nodes-base.if",
      "position": [
        3008,
        832
      ]
    },
    {
      "id": "8f5cccf6-209b-45d1-94b4-5fb742251cd7",
      "name": "Generate Nuke Roto Template",
      "type": "n8n-nodes-base.code",
      "position": [
        3248,
        768
      ]
    },
    {
      "id": "18ed4ee5-23e8-48f0-954f-e988a0d4e980",
      "name": "Download Roto Pass Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3632,
        928
      ]
    },
    {
      "id": "3a1f2b56-af75-4e95-8a3d-395b1854d5c9",
      "name": "Aggregate All Roto Passes",
      "type": "n8n-nodes-base.code",
      "position": [
        3872,
        592
      ]
    },
    {
      "id": "42f82c86-dd07-4bf7-8e18-b2e06d3096a7",
      "name": "Slack: QC Failed — Manual Roto Required",
      "type": "n8n-nodes-base.slack",
      "position": [
        3264,
        1056
      ]
    },
    {
      "id": "d3ceb3ae-3f26-42b1-8f31-e6b440473ef2",
      "name": "On Workflow Error",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        800,
        1472
      ]
    },
    {
      "id": "58f71bc7-df89-42c9-9fc7-5f9727e88082",
      "name": "Slack: Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1040,
        1472
      ]
    },
    {
      "id": "124b0449-f027-4903-8aea-512047ca5a0b",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        848,
        848
      ]
    },
    {
      "id": "4ac94404-08a8-42c8-bbc1-9db95600594d",
      "name": "Jira: Create Review Task",
      "type": "n8n-nodes-base.jira",
      "position": [
        3664,
        592
      ]
    },
    {
      "id": "e91c7feb-e63e-4147-b1d7-d0dd716e9535",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3856,
        928
      ]
    },
    {
      "id": "32c104eb-22a5-494b-a7fa-dfe4d564a19c",
      "name": "Send Telegram1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        4272,
        592
      ]
    },
    {
      "id": "03fa8019-ffbb-491f-a8cc-0a0483b96639",
      "name": "📋 Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -32
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "442a8c5b-521b-4b93-aa1f-d587977a4f37",
      "name": "Section: Trigger & Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "b1a028e1-e70a-4cc8-9a54-8991fcbeeb48",
      "name": "Section: Pass Generation & AI Render",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        592
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "05a1c9a7-a8d5-41f3-8737-e3394eaec50e",
      "name": "Section: Polling & Completion",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2032,
        608
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "debda788-ea79-4407-b954-51b79347841e",
      "name": "Section: QC Gate & Nuke Script",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2944,
        576
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "bb04585b-af0d-44d6-bac2-b845b9861313",
      "name": "Section: Delivery & Task Creation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3552,
        400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4373a992-bdaa-499e-9983-770627c32a8e",
      "name": "Section: Team Notifications",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4144,
        384
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f0fe0699-5c7d-4906-bbe3-bb7c848cde3d",
      "name": "Security Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4240,
        1216
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c77b161d-8c62-40e3-b0bd-fdc0c2657566",
      "name": "Section: Error Handler",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        1312
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Wait 20s": {
      "main": [
        [
          {
            "node": "Poll: Check Roto Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Workflow Error": {
      "main": [
        [
          {
            "node": "Slack: Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Validate & Extract Roto Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Roto Render Complete?": {
      "main": [
        [
          {
            "node": "Build Roto Metadata + QC Score",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 20s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fan-Out: 4 Roto Passes": {
      "main": [
        [
          {
            "node": "Build Roto Request Body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Roto Request Body": {
      "main": [
        [
          {
            "node": "Seedance: Generate Roto Pass",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Roto Pass Video": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jira: Create Review Task": {
      "main": [
        [
          {
            "node": "Aggregate All Roto Passes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Roto Passes": {
      "main": [
        [
          {
            "node": "Send Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QC Gate: Passes Threshold?": {
      "main": [
        [
          {
            "node": "Generate Nuke Roto Template",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack: QC Failed — Manual Roto Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Nuke Roto Template": {
      "main": [
        [
          {
            "node": "Download Roto Pass Video",
            "type": "main",
            "index": 0
          },
          {
            "node": "Jira: Create Review Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll: Check Roto Job Status": {
      "main": [
        [
          {
            "node": "Roto Render Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Roto Job ID + Metadata": {
      "main": [
        [
          {
            "node": "Poll: Check Roto Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Seedance: Generate Roto Pass": {
      "main": [
        [
          {
            "node": "Merge Roto Job ID + Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Extract Roto Brief": {
      "main": [
        [
          {
            "node": "Fan-Out: 4 Roto Passes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Roto Metadata + QC Score": {
      "main": [
        [
          {
            "node": "QC Gate: Passes Threshold?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}