{
  "name": "Obelisk Point: answer approved requests",
  "nodes": [
    {
      "name": "Obelisk Point wakes you",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "webhookId": "obelisk-point-approved",
      "parameters": {
        "httpMethod": "POST",
        "path": "obelisk-point-approved",
        "options": {}
      }
    },
    {
      "name": "Get the approved requests",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        240,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://obeliskpoint.com/api/v1/inbox",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      }
    },
    {
      "name": "One request at a time",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        480,
        0
      ],
      "parameters": {
        "fieldToSplitOut": "calls",
        "options": {}
      }
    },
    {
      "name": "Do the work (replace me)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        720,
        0
      ],
      "parameters": {
        "mode": "raw",
        "jsonOutput": "={{ { \"output\": { \"answer\": \"Replace this node with your work\" } } }}",
        "options": {}
      }
    },
    {
      "name": "Send the answer",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        960,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "=https://obeliskpoint.com/api/v1/calls/{{ $('One request at a time').item.json.content.action_call_id }}/result",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ { \"output\": $json.output } }}",
        "options": {}
      }
    }
  ],
  "connections": {
    "Obelisk Point wakes you": {
      "main": [
        [
          {
            "node": "Get the approved requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the approved requests": {
      "main": [
        [
          {
            "node": "One request at a time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "One request at a time": {
      "main": [
        [
          {
            "node": "Do the work (replace me)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Do the work (replace me)": {
      "main": [
        [
          {
            "node": "Send the answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6f1c2b0e-8a4d-4c55-9b7e-1d2a3c4b5e6f"
}