{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "CWC 07 - The Exception Desk - starter",
  "nodes": [
    {
      "id": "c0700000-0000-4000-8000-000000000001",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c0700000-0000-4000-8000-000000000002",
      "name": "My settings",
      "type": "n8n-nodes-base.set",
      "notes": "Enter your current participant key locally. Before uploading a copy, clear participantKey and remove saved run data. Keep the username, normal settings and nodes.",
      "position": [
        240,
        160
      ],
      "parameters": {
        "mode": "manual",
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c07+1234567890-+1234567890",
              "name": "username",
              "type": "string",
              "value": "your_forum_username"
            },
            {
              "id": "c07+1234567890-+1234567890",
              "name": "participantKey",
              "type": "string",
              "value": ""
            }
          ]
        },
        "includeOtherFields": false
      },
      "notesInFlow": false,
      "typeVersion": 3.5
    },
    {
      "id": "c0700000-0000-4000-8000-000000000003",
      "name": "Fetch my assignment and scans",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "The only data HTTP request for both questions. Set your forum username and current participant key in My settings. The key is sent only in the x-participant-key header, never a URL. One response contains your personal assignment and all 24 scans. No separate answer endpoint exists. The first data issue starts the original timer; refetch keeps it. Check the challenge website for participation dates. Endpoint: https://marketing.app.n8n.cloud/webhook/cwc/challenge-07/data.",
      "position": [
        500,
        160
      ],
      "parameters": {
        "url": "https://marketing.app.n8n.cloud/webhook/cwc/challenge-07/data",
        "method": "GET",
        "options": {
          "timeout": 30000,
          "redirect": {
            "redirect": {
              "followRedirects": false
            }
          },
          "response": {
            "response": {
              "neverError": false,
              "fullResponse": false,
              "responseFormat": "json"
            }
          }
        },
        "sendQuery": true,
        "sendHeaders": true,
        "specifyHeaders": "keypair",
        "queryParameters": {
          "parameters": [
            {
              "name": "username",
              "value": "={{ $json.username }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-participant-key",
              "value": "={{ $json.participantKey }}"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 4.5
    },
    {
      "id": "c0700000-0000-4000-8000-000000000004",
      "name": "Split scans",
      "type": "n8n-nodes-base.splitOut",
      "notes": "Splits the one shared rows array into 24 parcel scans. Both question calculations start from these same scans.",
      "position": [
        760,
        160
      ],
      "parameters": {
        "include": "noOtherFields",
        "options": {},
        "fieldToSplitOut": "rows"
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "c0700000-0000-4000-8000-000000000005",
      "name": "Question 1 answer",
      "type": "n8n-nodes-base.set",
      "notes": "Output placeholder only. Intentionally blank and disconnected. Build the native calculation from the shared scans, then connect it here and map your computed parcel_count as Number. This node is not an HTTP request and does not compute the answer.",
      "position": [
        1680,
        -24
      ],
      "parameters": {
        "mode": "manual",
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c07+1234567890-+1234567890",
              "name": "parcel_count",
              "type": "string",
              "value": ""
            }
          ]
        },
        "includeOtherFields": false
      },
      "notesInFlow": false,
      "typeVersion": 3.5
    },
    {
      "id": "c0700000-0000-4000-8000-000000000006",
      "name": "Question 2 answer",
      "type": "n8n-nodes-base.set",
      "notes": "Output placeholder only. Intentionally blank and disconnected. Build the native calculation from the shared scans, then connect it here and map your computed total_units as Number. This node is not an HTTP request and does not compute the answer.",
      "position": [
        1680,
        624
      ],
      "parameters": {
        "mode": "manual",
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c07+1234567890-+1234567890",
              "name": "total_units",
              "type": "string",
              "value": ""
            }
          ]
        },
        "includeOtherFields": false
      },
      "notesInFlow": false,
      "typeVersion": 3.5
    },
    {
      "id": "c0700000-0000-4000-8000-000000000007",
      "name": "1. Start here",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -440
      ],
      "parameters": {
        "color": 6,
        "width": 960,
        "height": 340,
        "content": "## The Exception Desk\nC07 of the n8n Community Weekly Challenge.\n\nUse the personal rule returned with your first data fetch.\n\nYour desk: read assignment.desk_code in the fetch response.\n\nEight parcels have three scans each. Latest means the largest scan_seq. Status, desk, service and units describe that scan and may change."
      },
      "typeVersion": 1
    },
    {
      "id": "c0700000-0000-4000-8000-000000000008",
      "name": "2. Fetch once for both questions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -68
      ],
      "parameters": {
        "color": 5,
        "width": 960,
        "height": 460,
        "content": "## Setup and shared data\n1. Check participation and create or recover your account at:\nhttps://marketing.app.n8n.cloud/webhook/cwc/challenge-07\n2. Enter your forum username and current key in My settings.\n3. Execute the fetch path when C07 participation is open. One response provides your personal assignment and all 24 rows.\n\nThe first data issue starts your original timer. Re-fetching retains the same assignment and start. **Both questions use this one request.** Importing this file alone makes no request."
      },
      "typeVersion": 1
    },
    {
      "id": "c0700000-0000-4000-8000-000000000009",
      "name": "3. Question 1 build area",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -440
      ],
      "parameters": {
        "color": 4,
        "width": 1000,
        "height": 620,
        "content": "## Question 1: Parcel count\nApply your assigned rule and compute how many selected parcels remain.\n\nBuild your missing native calculation in this area. Connect it to the blank Question 1 answer card and map your computed integer to **parcel_count**, using Number. Range: 1 to 8.\n\nThe card is an output placeholder, not an HTTP request or a supplied solution."
      },
      "typeVersion": 1
    },
    {
      "id": "c0700000-0000-4000-8000-000000000010",
      "name": "4. Question 2 build area",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        212
      ],
      "parameters": {
        "color": 4,
        "width": 1000,
        "height": 652,
        "content": "## Question 2: Total work units\nFor those same selected parcels, compute the total work_units.\n\nBuild your missing native calculation in this area. Connect it to the blank Question 2 answer card and map your computed integer to **total_units**, using Number. Range: 1 to 8,000,000.\n\nUse the same selected scans as Question 1. No second data request or answer endpoint is needed."
      },
      "typeVersion": 1
    },
    {
      "id": "c0700000-0000-4000-8000-000000000011",
      "name": "5. Finish and submit",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        424
      ],
      "parameters": {
        "color": 6,
        "width": 960,
        "height": 440,
        "content": "## Finish\nSubmit both computed integers, your workflow JSON and your own explanation at:\nhttps://marketing.app.n8n.cloud/webhook/cwc/challenge-07/submit\n\nExplanation: 40 to 2,000 characters and at least eight words. Export a clean copy. Clear participantKey and remove passwords, credentials, saved run data and pinned data. Keep normal settings, username and nodes.\n\nNo AI assistance. Code, Function and Function Item nodes are prohibited, including disconnected or disabled nodes. Other native choices and editor settings do not trigger method rejection.\n\nCorrect eligible answers are accepted automatically. After a lost response, check saved status before creating another request. Check the website for participation dates."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "My settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "My settings": {
      "main": [
        [
          {
            "node": "Fetch my assignment and scans",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch my assignment and scans": {
      "main": [
        [
          {
            "node": "Split scans",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
