I Built an AI Pipeline That Reads Support Emails and Drafts Replies (Here's What Actually Broke, and the Math on Whether It's Worth It)
说明与用途
该流水线自动对支持邮件进行分类和草稿生成,并将通知发送至Slack供人工审核。API成本约为每封邮件$0.01,而人工处理成本约为$1.67。
问题
Small business owners spend hours answering repetitive support emails, many of which are variations of a few common categories.
结果
The pipeline cuts per‑email labor cost from ~$1.67 to ~$0.01 in API spend, while keeping human review. It handles routine high‑confidence cases automatically and routes ambiguous ones to human review, achieving a balanced automation ratio.
工作流
- Pull unread Gmail messages via API
- Extract email body handling multipart/alternative and HTML fallback
- Classify with Claude using structured JSON schema (category, priority, intent, confidence, suggested_reply)
- Route to human based on category and confidence tier
- Generate draft reply in same API call
- Post Slack card with classification, draft, and assignee
- Mark email as read and record result in SQLite
- Human approves or edits draft in Gmail; no auto‑send
证据
The system prompt is about 3,100 characters (~840 tokens), sent on every call along with the email body. At Claude Sonnet's current pricing ($3/MTok input, $15/MTok output), a typical classification-plus-draft call - roughly 1,050 input tokens and 200 output tokens - costs approximately $0.0064 per email.
Industry surveys on support ticket handling time put a straightforward inquiry at somewhere between 3 and 8 minutes of staff time... one manually-answered routine email costs roughly $1.67 in labor.
- 记录日期: 2026-09-21T22:45:21.089Z