cd /news/ai-tools/n8n-workflow-that-sorts-support-emai… · home › topics › ai-tools › article
[ARTICLE · art-153470] src=gist.github.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

n8n workflow that sorts support emails into Gmail labels (Returns, Warranty, Quotes, Other) with the Text Classifier node and Claude. Paste it into an empty n8n workflow.

A developer published a ready-to-import n8n workflow that uses the Text Classifier node with an Anthropic Claude model to sort incoming support emails into Gmail labels for Returns, Warranty, Quotes and Other. The workflow polls a support address via a Gmail Trigger, classifies subject and body text against described categories, and applies the matching label, with a fallback branch routing uncategorized mail to Other so no messages are dropped.

key takeaway

Pairing n8n's Text Classifier node with a Claude model and a fallback category lets a Gmail-triggered workflow auto-label support mail into Returns, Warranty, Quotes and Other without dropping unmatched emails.

by read6 min views20 publishedOct 12, 2026

| | { | | | "name": "Support email sorter", | | | "nodes": [ | | | { | | | "parameters": { | | | "content": "## Setup steps\n1. In Gmail, create four labels: Returns, Warranty, Quotes, Other.\n2. Gmail Trigger: choose your Gmail credential and change the filter to your support address, for example to:yourname+support@gmail.com.\n3. Anthropic Chat Model: choose your Anthropic credential and a Claude model.\n4. In each Add ... label node, choose your Gmail credential and pick the matching label.\n5. Run a test with Fetch Test Event, then publish the workflow.\n\nEmails that fit no category go to the Other branch and get the Other label, so none are dropped.", | | | "height": 340, | | | "width": 460 | | | }, | | | "type": "n8n-nodes-base.stickyNote", | | | "typeVersion": 1, | | | "position": [ | | | -520, | | | -160 | | | ], | | | "id": "e6a58e30-b529-4474-b7a6-8e64691d957a", | | | "name": "Setup steps" | | | }, | | | { |

|  | "parameters": { | 
|  | "pollTimes": { | 
|  | "item": [ | 

| | { | | | "mode": "everyMinute" | | | } | | | ] | | | }, | | | "simple": false, | | | "filters": { | | | "q": "to:yourname+support@gmail.com" | | | }, | | | "options": {} | | | }, | | | "type": "n8n-nodes-base.gmailTrigger", | | | "typeVersion": 1.4, | | | "position": [ | | | 0, | | | 80 | | | ], | | | "name": "Gmail Trigger", | | | "id": "4a861507-1003-4528-9ea6-9f9b7370ae32" | | | }, | | | { |

|  | "parameters": { | 
|  | "inputText": "={{ $json.subject }}\n{{ $json.text }}", | 
|  | "categories": { | 
|  | "categories": [ | 

| | { | | | "category": "Returns", | | | "description": "The customer wants to send an item back, exchange it, or get a refund." | | | }, | | | { | | | "category": "Warranty", | | | "description": "A product broke, stopped working or has a defect, and the customer wants it repaired or replaced." | | | }, | | | { | | | "category": "Quotes", | | | "description": "The customer asks for a price, a bulk or business order, or a quote before buying." | | | } | | | ] | | | }, | | | "options": { | | | "fallback": "other" | | | } | | | }, | | | "type": "@n8n/n8n-nodes-langchain.textClassifier", | | | "typeVersion": 1.1, | | | "position": [ | | | 224, | | | 80 | | | ], | | | "name": "Text Classifier", | | | "id": "1682084f-1849-48df-bb8b-ebf1b3d4eced" | | | }, | | | { |

|  | "parameters": { | 
|  | "model": { | 

| | "__rl": true, | | | "value": "claude-haiku-5-5", | | | "mode": "list", | | | "cachedResultName": "Claude Haiku 5.5" | | | }, | | | "options": {} | | | }, | | | "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic", | | | "typeVersion": 1.6, | | | "position": [ | | | 296, | | | 376 | | | ], | | | "name": "Anthropic Chat Model", | | | "id": "8c8039fb-752f-4a3a-9489-069e6411f939" | | | }, | | | { | | | "parameters": { | | | "operation": "addLabels", |

|  | "messageId": "={{ $json.id }}", | 
|  | "labelIds": [] | 

| | }, | | | "type": "n8n-nodes-base.gmail", | | | "typeVersion": 2.2, | | | "position": [ | | | 576, | | | -16 | | | ], | | | "name": "Add Warranty label", | | | "id": "12618590-5636-48ad-b3ad-1856de3130af" | | | }, | | | { | | | "parameters": { | | | "operation": "addLabels", |

|  | "messageId": "={{ $json.id }}", | 
|  | "labelIds": [] | 

| | }, | | | "type": "n8n-nodes-base.gmail", | | | "typeVersion": 2.2, | | | "position": [ | | | 576, | | | -208 | | | ], | | | "name": "Add Returns label", | | | "id": "01721f9d-08ad-4285-9cd3-ef8c4adde52c" | | | }, | | | { | | | "parameters": { | | | "operation": "addLabels", |

|  | "messageId": "={{ $json.id }}", | 
|  | "labelIds": [] | 

| | }, | | | "type": "n8n-nodes-base.gmail", | | | "typeVersion": 2.2, | | | "position": [ | | | 576, | | | 176 | | | ], | | | "name": "Add Quotes label", | | | "id": "67c5558c-2064-4937-bd12-0c4b4ad991ff" | | | }, | | | { | | | "parameters": { | | | "operation": "addLabels", |

|  | "messageId": "={{ $json.id }}", | 
|  | "labelIds": [] | 

| | }, | | | "type": "n8n-nodes-base.gmail", | | | "typeVersion": 2.2, | | | "position": [ | | | 576, | | | 368 | | | ], | | | "name": "Add Other label", | | | "id": "27557aaa-8749-43a8-91bc-1acd523bc5e0" | | | } | | | ], |

|  | "pinData": {}, | 
|  | "connections": { | 
|  | "Gmail Trigger": { | 
|  | "main": [ | 

| | [ | | | { | | | "node": "Text Classifier", | | | "type": "main", | | | "index": 0 | | | } | | | ] | | | ] | | | }, |

|  | "Anthropic Chat Model": { | 
|  | "ai_languageModel": [ | 

| | [ | | | { | | | "node": "Text Classifier", | | | "type": "ai_languageModel", | | | "index": 0 | | | } | | | ] | | | ] | | | }, |

|  | "Text Classifier": { | 
|  | "main": [ | 

| | [ | | | { | | | "node": "Add Returns label", | | | "type": "main", | | | "index": 0 | | | } | | | ], | | | [ | | | { | | | "node": "Add Warranty label", | | | "type": "main", | | | "index": 0 | | | } | | | ], | | | [ | | | { | | | "node": "Add Quotes label", | | | "type": "main", | | | "index": 0 | | | } | | | ], | | | [ | | | { | | | "node": "Add Other label", | | | "type": "main", | | | "index": 0 | | | } | | | ] | | | ] | | | } | | | }, | | | "active": false, | | | "settings": { | | | "executionOrder": "v1" | | | } | | | } |

── more in #ai-tools 4 stories · sorted by recency
── more on @n8n 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/n8n-workflow-that-so…] indexed:0 read:6min 2026-10-12 · —