{
  "name": "Migrate ClickUp list or task tree to Nextcloud Deck as a one-off import",
  "nodes": [
    {
      "id": "8530c39c-04c9-4ed4-b40c-1cdeded0be8b",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1216,
        672
      ]
    },
    {
      "id": "d9d51e75-2997-4701-ba9d-548b9a88f631",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        32
      ],
      "parameters": {
        "width": 430,
        "height": 420,
        "content": "ClickUp View/List → Nextcloud Deck (one-off import)\n\nHow this version works:\n1. Uses the ClickUp view id from Set Config to resolve the real home list id.\n2. Fetches the full list with subtasks=true a"
      }
    },
    {
      "id": "cf17069e-29a8-4be9-86cc-fee725178c8e",
      "name": "Deck - Validate Board",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -448,
        576
      ]
    },
    {
      "id": "bb4bb97f-987c-45c8-a7a4-df6b2748ed80",
      "name": "Build Page Numbers",
      "type": "n8n-nodes-base.code",
      "position": [
        48,
        384
      ]
    },
    {
      "id": "0482a998-f170-4c87-887b-0528cd37650c",
      "name": "ClickUp - Get View Tasks Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        288,
        384
      ]
    },
    {
      "id": "c00b4025-1c7b-43ee-8b80-6723d6f934c0",
      "name": "Append Comments To Task",
      "type": "n8n-nodes-base.code",
      "position": [
        4064,
        464
      ]
    },
    {
      "id": "86ef54e9-41fc-44e0-ab78-0a2a8afdb57e",
      "name": "Build Stack Items",
      "type": "n8n-nodes-base.code",
      "position": [
        1664,
        464
      ]
    },
    {
      "id": "833bc781-60ef-49ce-9975-5c305fbb0566",
      "name": "Deck - Create Stack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1904,
        464
      ]
    },
    {
      "id": "11f5cec7-c260-4d30-bc6f-76ed7a77a844",
      "name": "After Stack Creation - Emit Once",
      "type": "n8n-nodes-base.code",
      "position": [
        2144,
        464
      ]
    },
    {
      "id": "0c0846e8-3b6e-4fdf-a60d-aeadb2c0d4d7",
      "name": "Deck - Get Stacks",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3344,
        464
      ]
    },
    {
      "id": "537c05f3-531f-42f5-9062-9e68f759b53b",
      "name": "Prepare Task Work Items",
      "type": "n8n-nodes-base.code",
      "position": [
        3584,
        464
      ]
    },
    {
      "id": "e222f2e2-eebe-4169-bf9e-3b6c058bc7ed",
      "name": "Deck - Create Card",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4304,
        464
      ]
    },
    {
      "id": "9b7e54b8-e8bb-4ad4-a517-90ba4454fd74",
      "name": "Result Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        5024,
        464
      ]
    },
    {
      "id": "cdb88ee9-b32f-4b1d-b76a-a2bca4779554",
      "name": "Resolve ClickUp Home List ID",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        384
      ]
    },
    {
      "id": "06b2a66c-6a3d-42d6-8018-e5f797f24ab6",
      "name": "Build List Page Numbers",
      "type": "n8n-nodes-base.code",
      "position": [
        768,
        384
      ]
    },
    {
      "id": "3de10cd3-c39b-45b1-9d20-19911e835915",
      "name": "ClickUp - Get List Tasks Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1008,
        384
      ]
    },
    {
      "id": "dcc46523-411d-4a45-8bcd-f39d1dd1bfc1",
      "name": "ClickUp - Get Task Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3824,
        464
      ]
    },
    {
      "id": "29fb5c0d-445a-472a-a6ba-4850fe612e66",
      "name": "Build Label Items",
      "type": "n8n-nodes-base.code",
      "position": [
        2384,
        464
      ]
    },
    {
      "id": "4f0ad243-60d3-449b-8aaa-b6f2f7612dc9",
      "name": "Deck - Create Label",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2624,
        464
      ]
    },
    {
      "id": "561e5564-7037-4ad9-9225-4d193ccc7de7",
      "name": "After Label Creation - Emit Once",
      "type": "n8n-nodes-base.code",
      "position": [
        2864,
        464
      ]
    },
    {
      "id": "5b55512a-41a9-4c15-a821-1a72861e5393",
      "name": "Deck - Get Board After Labels",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3104,
        464
      ]
    },
    {
      "id": "6e0a1544-be12-4b78-b27e-6a45b32d5c96",
      "name": "Prepare Label Assignments",
      "type": "n8n-nodes-base.code",
      "position": [
        4544,
        464
      ]
    },
    {
      "id": "b1ce5c62-0084-4279-8147-15a0a8ceca0e",
      "name": "Deck - Assign Label",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4784,
        464
      ]
    },
    {
      "id": "8e0d1695-b328-475e-90b4-e020bb245815",
      "name": "Prepare Completed Card Updates",
      "type": "n8n-nodes-base.code",
      "position": [
        4544,
        688
      ]
    },
    {
      "id": "54792a24-e7d8-42e6-9d98-d1f39c439778",
      "name": "Deck - Mark Card Done",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4784,
        688
      ]
    },
    {
      "id": "c00ce336-398c-49d2-8a45-00c68af881fb",
      "name": "Set Config - View",
      "type": "n8n-nodes-base.set",
      "position": [
        -944,
        544
      ]
    },
    {
      "id": "1d39725f-7407-4845-ac15-5075b0ec6262",
      "name": "Normalize ClickUp Parent Tasks - View",
      "type": "n8n-nodes-base.code",
      "position": [
        1248,
        384
      ]
    },
    {
      "id": "773e4122-8f19-4f7e-ae20-117f1ddfbe8e",
      "name": "Set Config - Task Root",
      "type": "n8n-nodes-base.set",
      "position": [
        -944,
        768
      ]
    },
    {
      "id": "82738d9c-445a-443d-bc56-04284080d2ca",
      "name": "Set Config",
      "type": "n8n-nodes-base.code",
      "position": [
        -624,
        576
      ]
    },
    {
      "id": "4f5a0530-9982-4629-a80f-a520a7c52382",
      "name": "IF - Task Root Mode",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        576
      ]
    },
    {
      "id": "9f4c1feb-5317-419b-984d-1544ef73ecc5",
      "name": "ClickUp - Get Root Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        48,
        688
      ]
    },
    {
      "id": "bae39d2b-eab0-4eb5-b4ce-1b88bdb396ed",
      "name": "Resolve Root Task Home List ID",
      "type": "n8n-nodes-base.code",
      "position": [
        288,
        688
      ]
    },
    {
      "id": "1f38fef9-aed3-404e-a61d-505a94f91250",
      "name": "Build Root Task List Page Numbers",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        688
      ]
    },
    {
      "id": "82bd02f4-fcd9-478b-a625-26746d856ccc",
      "name": "ClickUp - Get Root Task List Tasks Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        688
      ]
    },
    {
      "id": "4b00a98e-7381-4265-96d4-276115196fa1",
      "name": "Filter Root Task Tree",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        688
      ]
    },
    {
      "id": "653773f4-f1e8-4ea1-a18d-42efa4e553a7",
      "name": "Normalize ClickUp Task Tree",
      "type": "n8n-nodes-base.code",
      "position": [
        1248,
        688
      ]
    },
    {
      "id": "e579727c-6c9f-4068-9cef-8fefc16f64fc",
      "name": "Normalize ClickUp Parent Tasks",
      "type": "n8n-nodes-base.code",
      "position": [
        1488,
        464
      ]
    },
    {
      "id": "a944e36c-e5de-4f0a-91cb-0dae12718e4b",
      "name": "Sticky Note - Setup & Security",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        976
      ],
      "parameters": {
        "width": 520,
        "height": 330,
        "content": "Setup checklist for community use\n\n1. Replace all `INSERT-...-HERE` placeholders in the active config node.\n2. Reconnect the Nextcloud HTTP Basic Auth credential on every Deck HTTP node after import.\n"
      }
    },
    {
      "id": "04da686d-ad3b-4864-9028-f89e70bdd0af",
      "name": "Sticky Note - View Mode Branch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 600,
        "height": 300,
        "content": "Upper branch = View mode\n\nFlow:\nSet Config - View → Set Config → Validate Deck board → IF false branch\n→ seed page 0 on ClickUp view endpoint\n→ resolve the real home list ID\n→ paginate the list\n→ norm"
      }
    },
    {
      "id": "1b0f44b7-42b1-477e-af5a-c26eb210f907",
      "name": "Sticky Note - Task Root Branch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        880
      ],
      "parameters": {
        "width": 640,
        "height": 320,
        "content": "Lower branch = Task root mode\n\nFlow:\nSet Config - Task Root → Set Config → Validate Deck board → IF true branch\n→ fetch one root task\n→ resolve its home list\n→ paginate that list\n→ filter down to the "
      }
    },
    {
      "id": "628a7735-9b02-4bb1-ac6b-4df80e659097",
      "name": "Sticky Note - Shared Import Pipeline",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        0
      ],
      "parameters": {
        "width": 700,
        "height": 330,
        "content": "Shared pipeline after both branches merge\n\n1. Build unique Deck stacks from mapped statuses\n2. Create stacks\n3. Build unique Deck labels from normalized tasks\n4. Create labels\n5. Re-read board and sta"
      }
    },
    {
      "id": "6da070a3-5581-4967-8e28-d4d0bb5ba729",
      "name": "Sticky Note - Card Creation & Finishing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4144,
        0
      ],
      "parameters": {
        "width": 640,
        "height": 330,
        "content": "Final phase\n\n- Create one Deck card per parent task\n- Fan out label assignments and apply them\n- For tasks already complete in ClickUp, patch the created card with a `done` timestamp\n- Emit a result s"
      }
    }
  ],
  "connections": {
    "Set Config": {
      "main": [
        [
          {
            "node": "Deck - Validate Board",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Config - Task Root",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Label Items": {
      "main": [
        [
          {
            "node": "Deck - Create Label",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Stack Items": {
      "main": [
        [
          {
            "node": "Deck - Create Stack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Get Stacks": {
      "main": [
        [
          {
            "node": "Prepare Task Work Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Config - View": {
      "main": [
        [
          {
            "node": "Set Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Page Numbers": {
      "main": [
        [
          {
            "node": "ClickUp - Get View Tasks Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Create Card": {
      "main": [
        [
          {
            "node": "Prepare Label Assignments",
            "type": "main",
            "index": 0
          },
          {
            "node": "Prepare Completed Card Updates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Assign Label": {
      "main": [
        [
          {
            "node": "Result Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Create Label": {
      "main": [
        [
          {
            "node": "After Label Creation - Emit Once",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Create Stack": {
      "main": [
        [
          {
            "node": "After Stack Creation - Emit Once",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Task Root Mode": {
      "main": [
        [
          {
            "node": "Build Page Numbers",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ClickUp - Get Root Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Validate Board": {
      "main": [
        [
          {
            "node": "IF - Task Root Mode",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Root Task Tree": {
      "main": [
        [
          {
            "node": "Normalize ClickUp Task Tree",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Config - Task Root": {
      "main": [
        [
          {
            "node": "Set Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Comments To Task": {
      "main": [
        [
          {
            "node": "Deck - Create Card",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build List Page Numbers": {
      "main": [
        [
          {
            "node": "ClickUp - Get List Tasks Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ClickUp - Get Root Task": {
      "main": [
        [
          {
            "node": "Resolve Root Task Home List ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Task Work Items": {
      "main": [
        [
          {
            "node": "ClickUp - Get Task Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Label Assignments": {
      "main": [
        [
          {
            "node": "Deck - Assign Label",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ClickUp - Get Task Comments": {
      "main": [
        [
          {
            "node": "Append Comments To Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize ClickUp Task Tree": {
      "main": [
        [
          {
            "node": "Normalize ClickUp Parent Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resolve ClickUp Home List ID": {
      "main": [
        [
          {
            "node": "Build List Page Numbers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ClickUp - Get List Tasks Page": {
      "main": [
        [
          {
            "node": "Normalize ClickUp Parent Tasks - View",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ClickUp - Get View Tasks Page": {
      "main": [
        [
          {
            "node": "Resolve ClickUp Home List ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deck - Get Board After Labels": {
      "main": [
        [
          {
            "node": "Deck - Get Stacks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize ClickUp Parent Tasks": {
      "main": [
        [
          {
            "node": "Build Stack Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Completed Card Updates": {
      "main": [
        [
          {
            "node": "Deck - Mark Card Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resolve Root Task Home List ID": {
      "main": [
        [
          {
            "node": "Build Root Task List Page Numbers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "After Label Creation - Emit Once": {
      "main": [
        [
          {
            "node": "Deck - Get Board After Labels",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "After Stack Creation - Emit Once": {
      "main": [
        [
          {
            "node": "Build Label Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Root Task List Page Numbers": {
      "main": [
        [
          {
            "node": "ClickUp - Get Root Task List Tasks Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize ClickUp Parent Tasks - View": {
      "main": [
        [
          {
            "node": "Normalize ClickUp Parent Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ClickUp - Get Root Task List Tasks Page": {
      "main": [
        [
          {
            "node": "Filter Root Task Tree",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}