Your support inbox is a goldmine of insight — and a massive time sink. The average support team spends 40-60% of their time on tickets that could be handled with a well-crafted, contextually aware response. AI can do that work. Here's how to build a system that handles routine emails automatically while keeping humans in the loop for what actually needs them.
The Problem with "Just Use ChatGPT"
The first instinct is to dump emails into ChatGPT and copy-paste replies. This works for a day, then you realize:
- Responses don't know your product specifics
- Tone is inconsistent across team members
- There's no memory of past interactions with the same customer
- Nothing is logged or auditable
- You're manually triaging still
What you want is a pipeline, not a prompt.
The Architecture
Incoming email
↓
Classification (intent + urgency)
↓
┌─────────────────────────────────────┐
│ Routine (70%) │ Complex (30%) │
│ AI drafts reply │ Route to human │
│ Human reviews │ with AI brief │
│ One-click send │ │
└─────────────────────────────────────┘
↓
CRM logging + follow-up triggers
The key insight: AI drafts, humans approve. You're not removing humans — you're removing the blank page.
Step 1: Email Ingestion
Use Zapier, Make (formerly Integromat), or direct Gmail/Outlook API to pipe new emails into your system.
With Make, create a scenario:
- Trigger: Gmail → Watch Emails (label: support)
- Action: HTTP → Make a request (your classification endpoint)
- Branch based on classification result
Cost: Make free tier handles ~1,000 emails/month.
Step 2: Classify the Email
Before drafting a response, classify the intent. Build a simple serverless function:
import anthropic
import json
client = anthropic.Anthropic()
def classify_email(subject: str, body: str, customer_history: list) -> dict:
prompt = f"""Classify this customer support email and extract key information.
Subject: {subject}
Body: {body}
Customer history (last 3 tickets): {json.dumps(customer_history)}
Return JSON with:
- intent: one of [refund, bug_report, how_to, billing, complaint, feature_request, other]
- urgency: one of [high, medium, low]
- sentiment: one of [frustrated, neutral, positive]
- key_issue: one sentence summary
- suggested_category: which team should handle this
- can_automate: boolean (true if this is routine and template-able)
"""
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=500,
messages=[{"role": "user", "content": prompt}]
)
return json.loads(response.content[0].text)
This returns structured data you can act on — no more manual triage.
Step 3: Draft the Response
For emails classified as can_automate: true, generate a draft:
def draft_response(email_data: dict, classification: dict, knowledge_base: str) -> str:
prompt = f"""You are a customer support specialist for [Company Name].
Draft a helpful, friendly reply to this customer email.
CUSTOMER EMAIL:
Subject: {email_data['subject']}
Message: {email_data['body']}
CONTEXT:
- Issue type: {classification['intent']}
- Customer sentiment: {classification['sentiment']}
- Key issue: {classification['key_issue']}
YOUR KNOWLEDGE BASE:
{knowledge_base}
TONE GUIDELINES:
- Be warm but efficient. No excessive pleasantries.
- Address the specific issue directly in the first sentence.
- If you can fully resolve it, do so. If not, clearly state next steps.
- Sign off as the support team, not an AI.
- Maximum 150 words unless the issue genuinely requires more.
Draft the reply only. No meta-commentary.
"""
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=600,
messages=[{"role": "user", "content": prompt}]
)
return response.content[0].text
The knowledge base is the secret weapon. Dump your:
- FAQ document
- Product changelog
- Refund and return policy
- Known bugs and workarounds
- Pricing tiers
Into a text file. Refresh it weekly. The model will use it to give accurate, product-specific answers.
Step 4: Human Review Interface
Don't auto-send. Build a simple review queue.
The fastest approach: a shared Notion database with these properties:
- Customer email (text)
- AI draft (text)
- Classification (select)
- Status: Draft → Approved → Sent
- Assigned to (person)
The agent writes to Notion. The human opens the email, reads the draft, edits if needed, clicks Approved. A second automation watches for Approved status and sends via Gmail API.
Alternatively, if your team uses Slack, send the draft as a Slack message with two buttons: ✅ Send as-is | ✏️ Edit first. Clicking Send as-is triggers the Gmail send; clicking Edit opens a Slack modal.
Step 5: Handle the Complex 30%
For emails classified as can_automate: false (complaints, legal threats, complex bugs), route to a human — but give them a head start:
def create_human_brief(email_data: dict, classification: dict, customer_history: list) -> str:
prompt = f"""Create a brief for a human support agent handling this email.
Classification: {json.dumps(classification)}
Customer history: {json.dumps(customer_history)}
Email: {email_data['body']}
Write 3-5 bullet points covering:
• What the customer actually wants (not what they said — what they need)
• Relevant history from their past tickets
• Suggested approach or precedents
• Any landmines to avoid
"""
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=400,
messages=[{"role": "user", "content": prompt}]
)
return response.content[0].text
The agent opens a ticket that already says: "This customer has written 3 times about billing in the last 60 days. They're frustrated about [X]. Don't offer a discount without manager approval."
That's the human touch — applied where it actually matters.
What This Looks Like in Practice
After implementing this for a SaaS company:
- First response time: 4 hours → 23 minutes (during business hours)
- Time per ticket (human): 12 min → 3 min
- CSAT score: Stayed flat (customers didn't notice the AI)
- Tickets handled without edit: ~62%
- Escalation rate: Unchanged
The team's biggest surprise: the AI was better at catching emotional cues than the first-pass human read. It flagged a churn-risk customer that a human had marked as routine.
Deploying This
Minimal viable version (weekend project):
- Gmail label for support emails
- Zapier/Make → your classify + draft endpoint
- Notion database as review queue
- Gmail send automation
Cost: ~$30-80/month in API calls for most small support volumes.
Full version with Slack integration, CRM sync, and metrics dashboard: 2-3 weeks of engineering.
The Rule
AI handles the routine. Humans handle the relationships.
The goal isn't to remove your support team — it's to let them stop writing the same email for the 200th time and start focusing on the customers who need a real person.
We help businesses build AI automation systems like this at RooxAI. If you'd rather have it built for you than build it yourself, that's what we do.
Top comments (0)