π« Generate empathetic customer replies with Claude AI and auto-escalation
β‘ 39 views Β· π« Ticket Management & Triage
Description
π§ Overview
Generate empathetic, professional reply drafts for customer or user messages.
The workflow detects sentiment, tone, and risk level, drafts a concise response, sanitizes PII/links/emojis, and auto-escalates risky or low-confidence cases to human review.
βοΈ How It Works
- Input β Manual Test or Webhook Trigger
- AI Agent (Empathy) β returns
{ sentiment, tone, reply, confidence, needs_handover } - Post-Process & Sanitize β removes URLs/hashtags, masks PII, caps length
- Risk & Handover Rules β checks confidence threshold, risk words, and negativity
- Routing β auto-send safe replies or flag to Needs Review
π§© Setup Instructions (3β5 min)
- Open Set Config1 and adjust:
MAX_LEN(default 600)ADD_FOLLOWUP_QUESTION(true/false)FORMALITY(auto | casual | polite)EMOJI_ALLOWED(true/false),BLOCK_LINKS(true/false)RISK_WORDS(e.g.,refund, lawsuit, self-harm)
- Connect Anthropic credential to Anthropic Chat Model
- (Optional) Replace Manual Trigger with Webhook Trigger for real-time use
> Tip: If you need to show literal angle brackets in messages, use backticks like <example> (no HTML entities needed).
π Use Cases
1) SaaS Billing Complaints
- Input: βI was billed after canceling. This is unacceptable.β
- Output: Calm, apologetic reply with refund steps; escalates if
refundis inRISK_WORDSorconfidence < 0.45.
2) Product Bug Reports
- Input: βUpload fails on large files since yesterday.β
- Output: Acknowledges impact, requests logs, offers workaround; routes to auto-send if low risk and high confidence.
3) Delivery/Logistics Delays
- Input: βMy order is late again. Should I file a complaint?β
- Output: Empathetic apology, ETA guidance, partial credit policy note; escalates if language indicates legal action.
4) Community Moderation / Abuse
- Input: βSupport is uselessβyouβre all scammers.β
- Output: De-escalating, policy-aligned response; auto-flags due to negative sentiment + risk keyword match.
5) Safety / Self-harm Mentions
- Input: βI feel like hurting myself if this isnβt fixed.β
- Output: Immediate escalation, inserts approved resources; never auto-sends.
π¨ Auto-Escalation Rules (defaults)
- Negative sentiment
- Message matches any
RISK_WORDS confidence < 0.45- Mentions of legal, harassment, or self-harm context
π§ͺ Notes & Best Practices
- π No hardcoded API keys β use n8n Credentials
- π§ Tune thresholds and
RISK_WORDSto your org policy - π§© Works on self-hosted or cloud n8n
- β Treat outputs as drafts; ship after human/policy review
π Resources
- GitHub (template JSON): https://github.com/yskmtb0714/n8n-workflows/blob/main/empathy-reply-assistant.json
π Nodes Used
Google Sheets, Slack, Webhook, Schedule Trigger, AI Agent, Anthropic Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File