{
  "name": "Vorlux AI | Support Ticket Router",
  "nodes": [
    {
      "id": "e018cdb6-1f8d-4871-b34c-de119ebcc818",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        220,
        300
      ],
      "webhookId": "d51579bf-cb3b-43ac-9968-421cf62884e7",
      "parameters": {
        "httpMethod": "POST",
        "path": "ticket-route",
        "options": {
          "responseMode": "lastNode"
        }
      }
    },
    {
      "id": "066ba4aa-d688-4243-90f9-8aa280a0295b",
      "name": "Process",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const d=$input.first().json.body||$input.first().json;return [{json:{...d,processedAt:new Date().toISOString()}}];"
      }
    },
    {
      "id": "a7c68fba-f6b6-4db0-8b89-31e3ad9086eb",
      "name": "Execute",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        700,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "={{$env.VORLUX_HUB_URL}}/api/orchestrator/execute",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"action\":\"support_ticket_router\",\"params\":{{ JSON.stringify($json) }}}",
        "options": {
          "timeout": 60000
        }
      }
    },
    {
      "id": "7efcf724-ab9a-47bf-a0d2-de369b12be2e",
      "name": "Notify",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        700,
        400
      ],
      "parameters": {
        "method": "POST",
        "url": "={{$env.DISCORD_OPS_WEBHOOK}}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"embeds\":[{\"title\":\"Support Ticket Router\",\"color\":5793266}]}",
        "options": {
          "timeout": 10000
        }
      }
    },
    {
      "id": "93ccb2a2-a142-4a40-b9d3-cc6c54df0444",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        940,
        300
      ],
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ok:true}) }}"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process": {
      "main": [
        [
          {
            "node": "Execute",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "saveExecutionProgress": true
  }
}