{
  "name": "Design Factory Approval",
  "nodes": [
    {
      "id": "1",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        220,
        260
      ],
      "parameters": {}
    },
    {
      "id": "2",
      "name": "Run Context",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        260
      ],
      "parameters": {
        "mode": "raw",
        "jsonOutput": "{ \"runId\": \"replace-me\" }"
      }
    },
    {
      "id": "3",
      "name": "Get Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        700,
        260
      ],
      "parameters": {
        "method": "GET",
        "url": "={{ 'http://localhost:4300/runs/' + $json.runId + '/status' }}"
      }
    },
    {
      "id": "4",
      "name": "Awaiting Approval?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        940,
        260
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.status }}",
              "operation": "equal",
              "value2": "waiting-approval"
            }
          ]
        }
      }
    },
    {
      "id": "5",
      "name": "Approve Golden",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1180,
        180
      ],
      "notes": "Sends approval signal to Temporal",
      "parameters": {
        "method": "POST",
        "url": "={{ 'http://localhost:4300/runs/' + $item(0).$node['Run Context'].json.runId + '/signals/approve-golden' }}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{ \"reviewer\": \"n8n-approval\", \"notes\": \"Golden direction approved from workflow\" }"
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Run Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Context": {
      "main": [
        [
          {
            "node": "Get Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Status": {
      "main": [
        [
          {
            "node": "Awaiting Approval?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Awaiting Approval?": {
      "main": [
        [
          {
            "node": "Approve Golden",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "design-factory-approval-v1"
}