{
  "name": "Inbox Triage",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [250, 300],
      "id": "webhook-1",
      "name": "E-mail binnenkomst"
    },
    {
      "parameters": {
        "jsCode": "const subject = $json.body.subject || '';\nconst urgency = /urgent|asap|spoed/i.test(subject) ? 'high' : 'normal';\nreturn [{ json: { subject, urgency } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [450, 300],
      "id": "code-1",
      "name": "Classificeer urgentie"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false
          },
          "conditions": [
            {
              "id": "cond-1",
              "leftValue": "={{ $json.urgency }}",
              "rightValue": "high",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ]
        }
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [650, 300],
      "id": "if-1",
      "name": "Hoog urgent?"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [850, 200],
      "id": "slack-1",
      "name": "Stuur Slack alert"
    }
  ],
  "connections": {
    "E-mail binnenkomst": {
      "main": [[{"node": "Classificeer urgentie", "type": "main", "index": 0}]]
    },
    "Classificeer urgentie": {
      "main": [[{"node": "Hoog urgent?", "type": "main", "index": 0}]]
    },
    "Hoog urgent?": {
      "main": [
        [{"node": "Stuur Slack alert", "type": "main", "index": 0}]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}
