{
  "name": "Nexus HITL Template",
  "nodes": [
    {
      "parameters": {},
      "id": "e6f8b1a2-9b2c-4d3e-8f1a-0e9d8c7b6a5a",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        380,
        240
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://sga-app:8000/tasks/webhook/n8n/",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "execution_id",
              "value": "={{ $executionId }}"
            },
            {
              "name": "status",
              "value": "RUNNING"
            },
            {
              "name": "metadata",
              "value": "={ \"message\": \"Automa\u00e7\u00e3o Iniciada\", \"workflow_name\": \"Nexus HITL Template\" }"
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-e5f6-4a5b-8c9d-d0e1f2a3b4c5",
      "name": "Notify Django Start",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        600,
        240
      ]
    },
    {
      "parameters": {
        "amount": 2,
        "unit": "seconds"
      },
      "id": "c1d2e3f4-g5h6-4i7j-8k9l-m0n1o2p3q4r5",
      "name": "Simulate Work",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        820,
        240
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://sga-app:8000/tasks/webhook/n8n/",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "execution_id",
              "value": "={{ $executionId }}"
            },
            {
              "name": "status",
              "value": "AWAITING_INPUT"
            },
            {
              "name": "metadata",
              "value": "={ \"message\": \"Bloqueio Detectado: Verifica\u00e7\u00e3o necess\u00e1ria\", \"label\": \"Digite o c\u00f3digo de verifica\u00e7\u00e3o enviado:\" }"
            }
          ]
        },
        "options": {}
      },
      "id": "d1e2f3g4-h5i6-4j7k-8l9m-n0o1p2q3r4s5",
      "name": "Request HITL",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1040,
        240
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "nexus-resume-{{ $executionId }}",
        "options": {}
      },
      "id": "f1g2h3i4-j5k6-4l7m-8n9o-p0q1r2s3t4u5",
      "name": "Wait for Resume",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        1260,
        240
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://sga-app:8000/tasks/webhook/n8n/",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "execution_id",
              "value": "={{ $executionId }}"
            },
            {
              "name": "status",
              "value": "COMPLETED"
            },
            {
              "name": "metadata",
              "value": "={ \"message\": \"Automa\u00e7\u00e3o Conclu\u00edda com Sucesso!\", \"result\": \"{{ $node[\\\"Wait for Resume\\\"].json[\\\"body\\\"][\\\"input_value\\\"] }}\" }"
            }
          ]
        },
        "options": {}
      },
      "id": "g1h2i3j4-k5l6-4m7n-8o9p-q0r1s2t3u4v5",
      "name": "Notify Done",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1480,
        240
      ]
    }
  ],
  "connections": {
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Notify Django Start",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Django Start": {
      "main": [
        [
          {
            "node": "Simulate Work",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simulate Work": {
      "main": [
        [
          {
            "node": "Request HITL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request HITL": {
      "main": [
        [
          {
            "node": "Wait for Resume",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Resume": {
      "main": [
        [
          {
            "node": "Notify Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateId": null
  },
  "versionId": "adece-123-456",
  "triggerCount": 0,
  "tags": []
}