The Problem: Manual Triage in a 200-Person UK Insurer
You run a 200-person UK insurer. Your operations team handles 4,000 to 6,000 support tickets per month across claims, policyholder queries, and vendor communications. Each ticket is manually triaged by a first-line agent who reads the subject line, skims the body, and assigns it to a queue. The average handling time is 11 to 14 minutes per ticket, and misrouting rates sit at 8 to 12 percent, meaning nearly one in ten tickets lands in the wrong queue and gets re-routed, adding 3 to 5 minutes of dead time. Your ISO 27001 certification requires that any new system touching customer data passes a documented risk assessment under clause 8.2, and your board has set a 3-month deadline to show measurable cost reduction per ticket. The problem is not that you lack an AI tool; it is that you have no structured path from a single isolated pilot to a managed, auditable production system that fits inside your existing helpdesk, CRM, and ERP stack without replacing them.
Prerequisites Before You Touch n8n
Before you write a single n8n node, confirm these conditions are met:
- Helpdesk API access: Your helpdesk (Zendesk, Freshdesk, Jira Service Management, or equivalent) exposes a REST API with webhook support for new-ticket and ticket-update events. You need at least read and update permissions on ticket objects.
- ISO 27001 risk assessment initiated: Your information security officer has opened a risk register entry for the AI triage layer. You must document the data flows, the model provider’s DPA, and the access control model before the pilot goes live.
- Baseline metrics captured: For the 4 weeks before the pilot, log the average cycle time (ticket creation to first human action), misrouting rate, and cost per resolved ticket for at least one ticket category. This is your before/after baseline.
- n8n instance provisioned: A self-hosted n8n instance on your own infrastructure (not n8n Cloud) to satisfy data residency requirements. The instance must be behind your existing authentication and logging infrastructure.
- Model API keys scoped: API keys for OpenAI or Anthropic (or an open-weight model endpoint) restricted to the specific endpoints and token limits the pilot requires. Keys must be stored in your secrets manager, not in n8n environment variables visible to all team members.
- Stakeholder sign-off: The operations director, the CISO, and the head of customer service have agreed on the pilot scope: one ticket category, one routing destination, 6 to 8 weeks, no scope expansion.
Step 1: Audit the Triage Process and Capture Baseline Metrics
Run a 2-week process audit on the single ticket category you will automate. Export 200 to 300 historical tickets from your helpdesk for the target category. Tag each ticket with: original queue assignment, final queue assignment (after any re-routing), handling time, and whether it was escalated. Calculate the misrouting rate and average cycle time. This gives you the baseline numbers you will compare against after the pilot. Document the triage decision rules your agents currently use: which keywords trigger which queue, which customer segments get priority, and what happens when a ticket is ambiguous. These rules become the prompt structure for the LLM classification node. Without this audit, you are automating a process you do not fully understand, and the pilot will produce data you cannot interpret.
Step 2: Provision n8n on Your Own Infrastructure
Provision a self-hosted n8n instance on a VM or container within your existing network boundary. Use the n8n Docker image (n8nio/n8n:latest) with the following configuration: set N8N_ENCRYPTION_KEY from your secrets manager, enable N8N_DIAGNOSTICS_ENABLED=false to prevent telemetry, and configure the webhook listener to accept events only from your helpdesk’s IP range. Create a dedicated n8n user account with read-only access to the workflow for auditors and full access for the two engineers who will build the pilot. Version-control the workflow JSON in your Git repository under a pilot/ directory. This step takes 2 to 3 days including security review by your CISO’s team.
Step 3: Build the Triage Workflow in n8n
Build the n8n workflow with the following node sequence: (1) a Webhook node that receives the ticket.created event from your helpdesk; (2) an HTTP Request node that calls the LLM API (OpenAI gpt-4o or Anthropic claude-sonnet-4-20250514) with a structured prompt containing the ticket subject, body, customer segment, and the triage decision rules from Step 1; (3) a Code node that parses the JSON response and extracts the predicted queue, confidence score, and escalation risk; (4) an IF node that checks whether the confidence score is above 0.80; (5) an HTTP Request node that calls the helpdesk API to reassign the ticket to the predicted queue; (6) a Webhook node that logs the full request/response pair to your SIEM. If the confidence score is below 0.80, the workflow routes the ticket to a human review queue instead of auto-routing. This is your human-in-the-loop gate.
Step 4: Configure the LLM Prompt and Predictive Scoring
The LLM prompt must be deterministic and auditable. Structure it as follows: a system message defining the role (“You are a ticket triage classifier for a UK insurer”), the triage rules as a numbered list, the output format as strict JSON with fields predicted_queue, confidence (float 0 to 1), escalation_risk (float 0 to 1), and reasoning (one sentence). Include 3 to 5 few-shot examples from your historical data. Set the temperature to 0.1 to minimize variance. Log every prompt and response to your SIEM with a correlation ID matching the ticket ID. This logging is not optional under ISO 27001 clause 8.15 (logging and monitoring); your CISO will require it for the risk assessment. The prompt file should live in your Git repository, versioned, so that any change to the classification logic is traceable.
Step 5: Run the 6-to-8-Week Pilot in Parallel Mode
Run the pilot for 6 to 8 weeks on the single ticket category. During this period, the n8n workflow runs in parallel with the existing manual triage: the AI classifies and scores every ticket, but a human agent still makes the final routing decision. Compare the AI’s predicted queue against the human’s actual assignment. Track three metrics weekly: (1) agreement rate (percentage of tickets where AI and human agree on queue), (2) cycle time (ticket creation to first human action, measured in minutes), and (3) misrouting rate (tickets that required re-routing after initial assignment). At week 4, review the data with the operations director. If the agreement rate is above 85% and cycle time has dropped by at least 20%, you have a defensible case to switch from parallel mode to auto-routing mode for high-confidence tickets (score above 0.85). If the agreement rate is below 75%, do not proceed; go back to Step 1 and refine the triage rules.