{
  "name": "Production AI Playbook: Deterministic Steps & AI Steps (2 of 5) ",
  "nodes": [
    {
      "id": "7d7a6746-f791-496b-bdab-459812bfd96a",
      "name": "Webhook - Receive Support Ticket",
      "type": "n8n-nodes-base.webhook",
      "position": [
        240,
        288
      ]
    },
    {
      "id": "8abe42fe-476d-4786-af1f-629037a5d995",
      "name": "Clean Ticket Data",
      "type": "n8n-nodes-base.code",
      "position": [
        464,
        288
      ]
    },
    {
      "id": "9c0b5bb3-454b-4aff-b77c-9e14b3893399",
      "name": "AI - Classify Ticket",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        672,
        288
      ]
    },
    {
      "id": "92bc20de-3dd6-45a2-8ae5-3bb6de645cf3",
      "name": "Validate AI Output",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        288
      ]
    },
    {
      "id": "5633f342-11d1-4de2-938a-baec25ffd599",
      "name": "Is Output Valid?",
      "type": "n8n-nodes-base.if",
      "position": [
        1216,
        288
      ]
    },
    {
      "id": "3e0528fe-cdb1-493c-800b-97cdcecb8a12",
      "name": "Respond - Classification Result",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1472,
        192
      ]
    },
    {
      "id": "62c7be56-d1d7-4bff-88c3-8173f8563ef6",
      "name": "Respond - Needs Review",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1472,
        416
      ]
    },
    {
      "id": "0d2e0779-daf3-441e-925d-498b04338c52",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        656,
        496
      ]
    },
    {
      "id": "d9d387a9-70bd-4605-8f86-740d7305e975",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        80
      ],
      "parameters": {
        "width": 576,
        "height": 736,
        "content": "## Structured Output Parsing + Validation\n\n### How it works\n1. **Webhook** receives a support ticket via POST request.\n2. **Clean Ticket Data** (Code node) strips HTML, trims whitespace, and standardi"
      }
    },
    {
      "id": "81fad750-4b67-4cd7-b6a6-52c2d11936df",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        176
      ],
      "parameters": {
        "width": 400,
        "height": 496,
        "content": "## Receive & Clean\n"
      }
    },
    {
      "id": "bb0017a6-ad26-4ebc-bc81-e8b7b31a7013",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        176
      ],
      "parameters": {
        "width": 304,
        "height": 496,
        "content": "## AI Classification\n"
      }
    },
    {
      "id": "825d373a-2c5b-471a-a7ae-da4f750c4619",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        176
      ],
      "parameters": {
        "width": 736,
        "height": 496,
        "content": "## Validate & Route\n"
      }
    },
    {
      "id": "bd61fc72-0250-460b-9947-b19b358f041f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        816,
        496
      ]
    }
  ],
  "connections": {
    "Is Output Valid?": {
      "main": [
        [
          {
            "node": "Respond - Classification Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond - Needs Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Ticket Data": {
      "main": [
        [
          {
            "node": "AI - Classify Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate AI Output": {
      "main": [
        [
          {
            "node": "Is Output Valid?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI - Classify Ticket": {
      "main": [
        [
          {
            "node": "Validate AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI - Classify Ticket",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI - Classify Ticket",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Receive Support Ticket": {
      "main": [
        [
          {
            "node": "Clean Ticket Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}