{
  "name": "Incident Copilot - Analyze Incident",
  "nodes": [
    {
      "parameters": {
        "content": "## Incident Copilot\nRecebe um incidente validado pelo Incident Engine.\n\nO workflow \u00e9 importado desativado. Revise o token e as URLs antes de ativar.",
        "height": 220,
        "width": 360,
        "color": 5
      },
      "id": "c59f9808-e23b-4a72-a7a2-e7355f868b96",
      "name": "Read me",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        180,
        80
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "incident-copilot",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "c93bd20f-eaba-487d-b282-d29eb7dedf73",
      "name": "Receive Incident",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        360
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ ($env.INCIDENT_ENGINE_URL || 'http://incident-engine:8000') + '/analyze' }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Incident-Token",
              "value": "={{ $env.INCIDENT_WEBHOOK_TOKEN }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{ JSON.stringify($json.body || $json) }}",
        "options": {
          "timeout": 30000
        }
      },
      "id": "f2e98b8e-31f9-491e-a3fe-ea9749728609",
      "name": "Analyze Incident",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        360
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "ab0f1975-2cf2-48a7-9ef3-d8772da9f6cf",
      "name": "Return Analysis",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        760,
        360
      ]
    }
  ],
  "connections": {
    "Receive Incident": {
      "main": [
        [
          {
            "node": "Analyze Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Incident": {
      "main": [
        [
          {
            "node": "Return Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "none",
    "saveManualExecutions": true
  },
  "versionId": "65ba0e20-fd4a-4fa6-8538-b82c3fcc594e",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}