{
  "name": "05-hitl-approval",
  "nodes": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "When a new expense is submitted",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "parameters": {},
      "notes": "Original Relay trigger: app-event. Wire the real n8n trigger manually."
    },
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "Get the expense details via HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        300,
        300
      ],
      "parameters": {
        "method": "GET",
        "url": "TODO: set request URL (from Relay prompt)",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000002",
      "name": "Request approval from the manager over Slack \u2014 send request",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.5,
      "position": [
        600,
        300
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "TODO: set channel (from Relay prompt)"
        },
        "text": "TODO: set message text (from Relay prompt)",
        "otherOptions": {}
      },
      "notes": "Human-in-the-loop request. Due dates / reminders / escalation are NOT reproduced \u2014 wire manually.",
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000003",
      "name": "Request approval from the manager over Slack \u2014 wait for response",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        900,
        300
      ],
      "parameters": {
        "resume": "webhook",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000004",
      "name": "Record the expense in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1200,
        300
      ],
      "parameters": {
        "resource": "sheet",
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "TODO: set spreadsheet id (from Relay prompt)"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "TODO: set sheet name (from Relay prompt)"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {}
        },
        "options": {}
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000005",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        600,
        100
      ],
      "parameters": {
        "content": "## \u26a0 Human-in-the-loop\n\n\"Request approval from the manager over Slack\": Approximated with Wait-for-webhook + Gmail/Slack. Due dates, reminders and escalation modes are NOT reproduced at fidelity \u2014 wire them manually.",
        "height": 160,
        "width": 280,
        "color": 5
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000006",
      "name": "Sticky Note 2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -160
      ],
      "parameters": {
        "content": "## \u26a0 Secrets and credentials\n\nEvery credential must be re-entered by hand in n8n. No automation possible.",
        "height": 160,
        "width": 280,
        "color": 1
      }
    }
  ],
  "connections": {
    "When a new expense is submitted": {
      "main": [
        [
          {
            "node": "Get the expense details via HTTP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request approval from the manager over Slack \u2014 send request": {
      "main": [
        [
          {
            "node": "Request approval from the manager over Slack \u2014 wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the expense details via HTTP": {
      "main": [
        [
          {
            "node": "Request approval from the manager over Slack \u2014 send request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request approval from the manager over Slack \u2014 wait for response": {
      "main": [
        [
          {
            "node": "Record the expense in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}