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