# n8n: Zendesk/Freshdesk Ticket Triage with Claude

> Auto-categorize inbound support tickets, extract intent, suggest a reply draft, and route to the right team using n8n and Claude Sonnet.

**Platform:** n8n  
**Category:** n8n  
**Difficulty:** Intermediate  
**Tags:** n8n, support, claude, triage  
**Updated:** 2026-06-27  
**Source:** https://promptfoo.tech/workflows/n8n-support-ticket-triage-with-claude

## 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
1. A webhook trigger fires when a new ticket is created.
2. The ticket body + subject + customer metadata are packed into a Claude request.
3. A JSON-schema-constrained prompt returns category, priority, sentiment, and a draft response.
4. n8n writes those fields back via Zendesk/Freshdesk API.
5. 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
### 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...'
```

## FAQs
**Why not auto-reply?**

You will regret it. Draft-in-agent-view keeps humans accountable and catches the 5% of edge cases that would erode trust.

**Cost per ticket?**

About $0.002-0.005 on Claude Sonnet. Trivial versus agent time saved.

**Freshdesk vs Zendesk?**

Same pattern — different API shape. n8n has native nodes for both.

---
Licensed under CC-BY-4.0. Attribution: PromptFoo.tech