workflows.fit
Back to n8n workflows
n8n templateFreeBy Yusuke

Generate empathetic customer replies with Claude AI and auto-escalation

🧠 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...

Data & StorageProductivityCommunicationHITLDevelopmentCore NodesAILangchain
Loading interactive preview...

Template notes

🧠 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 1. Input β€” Manual Test or Webhook Trigger 2. AI Agent (Empathy) β€” returns { sentiment, tone, reply, confidence, needshandover } 3. Post-Process & Sanitize β€” removes URLs/hashtags, masks PII, caps length 4. Risk & Handover Rules β€” checks confidence threshold, risk words, and negativity 5. Routing β€” auto-send safe replies or flag to Needs Review

---

🧩 Setup Instructions (3–5 min) - Open Set Config1 and adjust: - MAXLEN (default 600) - ADDFOLLOWUPQUESTION (true/false) - FORMALITY (auto | casual | polite) - EMOJIALLOWED (true/false), BLOCKLINKS (true/false) - RISKWORDS (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 refund is in RISKWORDS or confidence < 0.45.