{
  "name": "Generate clean plates and automate object removal with Seedance AI",
  "nodes": [
    {
      "id": "1845c31c-5bb6-4d87-a145-ae1f95eb1ebe",
      "name": "Webhook: Clean Plate Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        832,
        784
      ]
    },
    {
      "id": "b166fe15-cdc1-48db-8e3f-12d093197b42",
      "name": "Validate & Extract Input",
      "type": "n8n-nodes-base.code",
      "position": [
        1072,
        784
      ]
    },
    {
      "id": "e93a948a-7977-4126-8cdd-da7b6a31bcdd",
      "name": "Fan-Out: 4 Clean Plate Passes",
      "type": "n8n-nodes-base.code",
      "position": [
        1312,
        784
      ]
    },
    {
      "id": "190abb7a-f8ee-4d63-81d9-dfb46a2be7cf",
      "name": "Build Clean Plate Request",
      "type": "n8n-nodes-base.code",
      "position": [
        1552,
        784
      ]
    },
    {
      "id": "c1238448-bee6-419b-af11-ea8e2d510ebb",
      "name": "Seedance: Generate Clean Pass",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1792,
        784
      ]
    },
    {
      "id": "bf8a8ea6-7faa-4f1b-a7c7-0b2a66214e7e",
      "name": "Merge Job ID + Metadata",
      "type": "n8n-nodes-base.code",
      "position": [
        2032,
        784
      ]
    },
    {
      "id": "7a6c4518-a2df-42e4-87e9-a3ab2e3c924b",
      "name": "Poll: Check Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2272,
        784
      ]
    },
    {
      "id": "939a6274-388f-44c1-af3a-e35c8539c727",
      "name": "Wait 20s",
      "type": "n8n-nodes-base.wait",
      "position": [
        2416,
        1056
      ]
    },
    {
      "id": "bef102c7-032e-4bac-903e-e47690531e00",
      "name": "Render Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        2512,
        784
      ]
    },
    {
      "id": "0076c0d9-feae-462e-b84f-b0732b65dee8",
      "name": "Build Clean Plate Metadata + QC",
      "type": "n8n-nodes-base.code",
      "position": [
        2736,
        768
      ]
    },
    {
      "id": "05df9813-796a-47a3-967e-717455bb0a3f",
      "name": "QC Check: Passes Threshold?",
      "type": "n8n-nodes-base.if",
      "position": [
        3008,
        816
      ]
    },
    {
      "id": "34930ec2-c4bd-447a-8851-01232765b47d",
      "name": "Generate Nuke Comp Script",
      "type": "n8n-nodes-base.code",
      "position": [
        3232,
        608
      ]
    },
    {
      "id": "11dea254-8274-48fb-8a9b-029e7e3308bc",
      "name": "Download Clean Plate Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3616,
        800
      ]
    },
    {
      "id": "5df88f1b-96ec-4489-9f21-221a04a4e4dd",
      "name": "Google Drive: Upload Clean Plate",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3904,
        800
      ]
    },
    {
      "id": "f22c8936-37b8-4f15-8b33-a2cb82279830",
      "name": "Aggregate All Passes",
      "type": "n8n-nodes-base.code",
      "position": [
        4112,
        528
      ]
    },
    {
      "id": "6dce94fe-8de1-4bf4-b523-22ceb5d90dde",
      "name": "Slack: Notify Paint/Comp Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        4400,
        384
      ]
    },
    {
      "id": "33185252-2326-4683-8f6e-ae9170930389",
      "name": "Slack: QC Failed — Artist Review",
      "type": "n8n-nodes-base.slack",
      "position": [
        3360,
        1152
      ]
    },
    {
      "id": "ba7a8922-509e-4a99-9931-d3f9ec75efc1",
      "name": "Create a database page",
      "type": "n8n-nodes-base.notion",
      "position": [
        3696,
        528
      ]
    },
    {
      "id": "9d556eab-3bb8-4390-9bfb-509c832cc363",
      "name": "Send Telegram1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        4400,
        688
      ]
    },
    {
      "id": "d118d7e7-9117-4fbb-b182-f15200021174",
      "name": "📋 Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -16
      ],
      "parameters": {
        "width": 756,
        "height": 548,
        "content": "## 🎬 AI Clean Plate Generator\n\n### How it works\nThis workflow automates AI-assisted clean plate generation for VFX production. When triggered via webhook, it fans out four parallel render passes — pri"
      }
    },
    {
      "id": "fb0bd91a-5bf7-46f2-96d5-bbb75524c24b",
      "name": "Section: Trigger & Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        560
      ],
      "parameters": {
        "width": 500,
        "height": 472,
        "content": "## 📡 Trigger & Validation\nAccepts incoming shot requests via POST webhook and validates required fields (`plateImageUrl`, `removalBrief`, `shotCode`). Enriches the payload with sensible defaults for o"
      }
    },
    {
      "id": "85cb9817-b621-4990-ab37-5cb6b3b6558b",
      "name": "Section: Pass Generation & AI Render",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        560
      ],
      "parameters": {
        "width": 684,
        "height": 504,
        "content": "## 🎞️ Pass Generation & AI Render\nFans out into four distinct render passes and builds image-to-video requests using the plate image as reference. Each pass is submitted to the Seedance API and the re"
      }
    },
    {
      "id": "daf79825-320a-421b-a0c9-3600b3df578f",
      "name": "Section: Polling & Job Completion",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1984,
        512
      ],
      "parameters": {
        "width": 692,
        "height": 840,
        "content": "## ⏳ Polling & Job Completion\nPolls the Seedance API every 20 seconds until the render job reports `succeeded`. If still processing, execution waits and retries automatically. Once complete, metadata "
      }
    },
    {
      "id": "3cc5f41c-ade7-4e0d-be9b-3b343cd7598a",
      "name": "Section: QC Check & Nuke Script",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2688,
        496
      ],
      "parameters": {
        "width": 840,
        "height": 856,
        "content": "## 🔍 QC Check & Nuke Script\nScores each rendered pass against the configured QC threshold. Passes that meet the bar get a Nuke compositing script auto-generated with Read, Merge, Grade, and Write node"
      }
    },
    {
      "id": "8e63b13d-0a36-4f52-81c2-fdf589574010",
      "name": "Section: Asset Storage & Logging",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3568,
        304
      ],
      "parameters": {
        "width": 504,
        "height": 696,
        "content": "## ☁️ Asset Storage & Logging\nDownloads the rendered video and uploads it to Google Drive under the correct shot folder. Simultaneously logs the pass metadata — variant ID, video URL, plate URL, proje"
      }
    },
    {
      "id": "940e25f0-35c4-4aca-98fa-20d9e6896030",
      "name": "Section: Team Notifications",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4080,
        144
      ],
      "parameters": {
        "width": 600,
        "height": 792,
        "content": "## 📣 Team Notifications\nAggregates all four passes into a single summary and sends it to both Slack and Telegram. The message includes per-pass QC scores, video links, Nuke script content, and folder "
      }
    },
    {
      "id": "60a20a95-954b-4668-bfd0-a81bc5972ea2",
      "name": "Security Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4336,
        1088
      ],
      "parameters": {
        "width": 356,
        "height": 192,
        "content": "## 🔐 Credentials & Security\nUse n8n credential store for all secrets — Seedance API key, Google Drive OAuth2, Notion API, Slack OAuth2, and Telegram Bot token. Never hardcode tokens in node headers. R"
      }
    },
    {
      "id": "621abc1d-4163-4aaf-b480-f747bd03f812",
      "name": "On Workflow Error",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        832,
        1424
      ]
    },
    {
      "id": "be1bebcd-f0a4-41f4-ac75-ac94e689e766",
      "name": "Slack: Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1088,
        1424
      ]
    },
    {
      "id": "d78670ac-d147-4373-b60f-243b773ba28b",
      "name": "Section: Error Handler",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        1264
      ],
      "parameters": {
        "width": 492,
        "height": 328,
        "content": "## ⚠️ Error Handler\nCatches any failure across the entire workflow and immediately sends a Slack alert to the ops channel. Wire this to every sub-workflow or critical node to ensure no silent failures"
      }
    }
  ],
  "connections": {
    "Wait 20s": {
      "main": [
        [
          {
            "node": "Poll: Check Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Render Complete?": {
      "main": [
        [
          {
            "node": "Build Clean Plate Metadata + QC",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 20s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Workflow Error": {
      "main": [
        [
          {
            "node": "Slack: Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Passes": {
      "main": [
        [
          {
            "node": "Slack: Notify Paint/Comp Team",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a database page": {
      "main": [
        [
          {
            "node": "Aggregate All Passes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll: Check Job Status": {
      "main": [
        [
          {
            "node": "Render Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Job ID + Metadata": {
      "main": [
        [
          {
            "node": "Poll: Check Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Extract Input": {
      "main": [
        [
          {
            "node": "Fan-Out: 4 Clean Plate Passes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Clean Plate Request": {
      "main": [
        [
          {
            "node": "Seedance: Generate Clean Pass",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Nuke Comp Script": {
      "main": [
        [
          {
            "node": "Download Clean Plate Video",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a database page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Clean Plate Video": {
      "main": [
        [
          {
            "node": "Google Drive: Upload Clean Plate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QC Check: Passes Threshold?": {
      "main": [
        [
          {
            "node": "Generate Nuke Comp Script",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack: QC Failed — Artist Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Clean Plate Request": {
      "main": [
        [
          {
            "node": "Validate & Extract Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fan-Out: 4 Clean Plate Passes": {
      "main": [
        [
          {
            "node": "Build Clean Plate Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Seedance: Generate Clean Pass": {
      "main": [
        [
          {
            "node": "Merge Job ID + Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Clean Plate Metadata + QC": {
      "main": [
        [
          {
            "node": "QC Check: Passes Threshold?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Upload Clean Plate": {
      "main": [
        [
          {
            "node": "Aggregate All Passes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}