{
  "name": "Support Ticket Prioritization with Verifiable Decision Receipts",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "ticket-priority",
        "options": {},
        "responseMode": "responseNode"
      },
      "id": "ef08faa5-9bc7-4629-a6e3-b9065291e961",
      "name": "Support Ticket Prioritization",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a support triage AI. Return JSON: {\"priority\":\"P1|P2|P3|P4\",\"category\":\"...\",\"reason\":\"...\"}."
            },
            {
              "content": "=Return JSON only.\n\nInput:\n{{ JSON.stringify($json.body) }}"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "id": "d64bbc17-f348-488c-bd37-08c45d5e2344",
      "name": "AI Decision",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.1,
      "position": [
        220,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "generateReceipt",
        "agentName": "TriagePriorityAgent",
        "workflowName": "={{ $workflow.name }}",
        "action": "={{ 'AI decision: ' + ($json.message.content.decision || $json.message.content.recommendation || 'completed') }}",
        "decision": "={{ JSON.stringify($json.message.content) }}",
        "additionalFields": {
          "modelProvider": "openai",
          "modelUsed": "gpt-4o",
          "decisionType": "ticket_priority",
          "riskLevel": "low",
          "humanReview": false,
          "policies": "support-sla-v2",
          "permissions": "ticket.prioritize",
          "tags": "support, triage, ops"
        }
      },
      "id": "5bb658e9-986a-4433-be9c-0518955c6682",
      "name": "Signatrust: Receipt",
      "type": "n8n-nodes-signatrust.signatrust",
      "typeVersion": 1,
      "position": [
        440,
        300
      ],
      "credentials": {
        "signatrustApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "REPLACE_SHEET_ID"
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Sheet1",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": []
        },
        "options": {}
      },
      "id": "f9e8eb83-b7f7-422d-ae3b-c0d30a3a99f8",
      "name": "Log to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        660,
        300
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Support Ticket Prioritization with Verifiable Decision Receipts\n**Why Signatrust?** Every AI decision here becomes a tamper-evident, Ed25519-signed receipt \u2014 verifiable for audits and disputes.",
        "height": 170,
        "width": 420,
        "color": 5
      },
      "id": "a2a720e3-df91-4529-9557-0f7b6a7ae8f6",
      "name": "Sticky Note 46d41b",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        40
      ]
    }
  ],
  "connections": {
    "Support Ticket Prioritization": {
      "main": [
        [
          {
            "node": "AI Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Decision": {
      "main": [
        [
          {
            "node": "Signatrust: Receipt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Signatrust: Receipt": {
      "main": [
        [
          {
            "node": "Log to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "Support Ticket Prioritization \u2014 support"
    },
    {
      "name": "Support Ticket Prioritization \u2014 triage"
    },
    {
      "name": "Support Ticket Prioritization \u2014 ops"
    },
    {
      "name": "Signatrust (12)"
    }
  ],
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "versionId": "9f446640-8d5a-4e17-b8d3-a077e91878ff"
}