Overview
Every support team burns hours on triage. This workflow uses n8n to catch new tickets from Zendesk or Freshdesk, sends them to Claude with a structured classification prompt, and writes back three fields: category, sentiment, and a suggested first response. Agents open pre-analyzed tickets and start from a draft instead of a blank textarea.
How it works
- A webhook trigger fires when a new ticket is created.
- The ticket body + subject + customer metadata are packed into a Claude request.
- A JSON-schema-constrained prompt returns category, priority, sentiment, and a draft response.
- n8n writes those fields back via Zendesk/Freshdesk API.
- High-severity tickets fire an additional Slack alert to the on-call channel.
Benefits
- Cuts median time-to-first-response by 40-60% in real deployments.
- Consistent categorization improves reporting and staffing forecasts.
- Agents keep judgment — they see a draft, not an auto-send.
Use cases
- SaaS support teams with 100+ inbound tickets a day.
- E-commerce brands routing between shipping / billing / product-defect queues.
- Agencies triaging client tickets across multiple accounts.
Step-by-step guide
Step 1: Configure the webhook in Zendesk
Zendesk → Extensions → Webhooks. Point it at your n8n webhook URL with a shared secret in the header.
Step 2: Build the classification prompt
Include category list, priority rubric, and voice guide. Enforce JSON output using the schema block.
Step 3: Wire Claude with structured output
Anthropic node; set max_tokens conservatively (~600) and validate the JSON. Retry once on schema error.
Step 4: Write fields back to the ticket
PUT to /api/v2/tickets/{id} with custom fields for category, priority, and internal note for the draft.
Step 5: Alert on critical tickets
If priority='critical' or sentiment='angry', send a Slack message with a deep link to the ticket.
Step 6: Sample and evaluate weekly
Pull 30 random tickets. Have a senior agent grade the classifications. Feed misses back into the prompt.
Example
Ticket: 'Order #4482 arrived broken, this is the second time!' → category:refund-request, priority:high, sentiment:angry, draft:'Hi Alex, I'm so sorry — I can see this is the second time...'