# Triage a support inbox with an agent

An n8n workflow reads each new support email, tags it, and saves a draft reply. A person reviews and sends every reply.

- Category: Customer support
- Runs on: n8n
- Level: Intermediate
- Audience: both
- Setup time: about 60 minutes
- Evidence: Documented (each step backed by official docs; not tested by us)
- Last updated: 2026-10-31
- Named sources: 10
- Canonical URL: https://crimsonbot.com/use-cases/support-inbox-triage

> **Warning:** Privacy. Each support email, including the customer's name, address and message, is sent to Anthropic's API to tag it and draft a reply. Check that your privacy notice and customer terms allow this. Keep attachments out of the prompt.

## You will need

- A Gmail inbox used for support (Google Workspace or personal)
- n8n: n8n Cloud (paid after a free trial) or the free self-hosted Community edition
- An Anthropic API key for Claude (usage is billed per token), or n8n Cloud AI credits
- A one-page list of your ticket types, urgency rules and links to your help docs

## You will end up with

- Every new email labelled with a ticket type and urgency in Gmail
- A draft reply saved in Gmail for each ticket, never sent automatically
- A short weekly list of rules to improve, based on the drafts you rewrote

## Steps

### 1. Set up n8n and connect Gmail

Use n8n Cloud or self-host the free Community edition. Add a Google credential for Gmail. Gmail has no draft-only permission: the scope that lets an app create drafts also lets it send mail. So the protection here is the workflow itself: never add a Gmail 'Send' or 'Reply' step.

Sources:
- [n8n pricing](https://n8n.io/pricing/)
- [n8n docs: Host n8n](https://docs.n8n.io/deploy/host-n8n)
- [Google: Gmail API scopes](https://developers.google.com/workspace/gmail/api/auth/scopes)
- [n8n docs: Gmail node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail)

### 2. Trigger on new email

Add a Gmail Trigger node. It checks for new messages at the poll time you set (for example every 15 minutes). Start by filtering to one label or a test address so you only handle a small batch at first.

Sources:
- [n8n docs: Gmail Trigger node](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger)

### 3. Write your tags and rules on one page

List the ticket types you see most (for example billing, bug, how-to, refund) and what counts as urgent. Keep it to one page. This becomes the classifier's categories and the drafting prompt.

### 4. Classify each email

Add a Text Classifier node with your categories, connected to an Anthropic Chat Model node (Claude). Add a final category, needs-human, for anything the model is unsure about.

Sources:
- [n8n docs: Text Classifier node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier)
- [n8n docs: Anthropic Chat Model node](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatanthropic)

### 5. Label the email and save a draft reply

Use the Gmail node's 'Add Label to a message' operation for the type and urgency. Then ask the model for a reply and save it with the Gmail node's 'Create a draft' operation. A Gmail draft is an unsent message.

```text
You draft replies for the support inbox of [COMPANY].
Ticket type: {{type}}. Urgent: {{urgent}}.
Use only facts from these help docs: [LINKS].
Write in our voice: [2-3 lines on tone].
If the docs do not answer the question, write one line saying a teammate will follow up and add the note NEEDS-HUMAN at the top.
Never promise refunds, dates or fixes.
```

Sources:
- [n8n docs: Gmail node (operations)](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail)
- [Google: Working with drafts (Gmail API)](https://developers.google.com/workspace/gmail/api/guides/drafts)

### 6. A person reviews and sends every draft (human checkpoint)

Open Gmail, read each draft, edit it and send it yourself. Do not add a send step to the workflow until the drafts have needed almost no edits for several weeks, and even then keep refunds and angry customers with a person. If you later move to an AI Agent node with a send tool, n8n can require human approval before that tool runs.

Sources:
- [n8n docs: Human-in-the-loop for tools](https://docs.n8n.io/build/integrate-ai/ai-examples/human-in-the-loop-for-tools)

### 7. Improve the rules each week

Look at the drafts you rewrote the most. Add one line to your rules or prompt for each pattern. Watch for emails that try to instruct the agent (prompt injection): treat email text as data, never as instructions.

Sources:
- [Anthropic: Mitigating prompt injections in browser use](https://www.anthropic.com/research/prompt-injection-defenses)

## Tools used

- [n8n](https://n8n.io): Workflow automation with AI agent nodes.

## Next

- [Our tool: Scrub a PDF locally before you paste it into AI →](https://crimsonbot.com/go/p/pdf-scrubber)
- [Get an email when the newsletter launches →](https://crimsonbot.com/#newsletter)
