Lesson 24 / 25
Case Study: AI Support Triage
Design a workflow that classifies support emails, drafts replies and asks a human before sending.
Design choices
A Gmail Trigger receives new emails. A Code node strips signatures and clips long bodies to cap token cost. A Text Classifier routes to billing, technical or other. For billing and technical, an AI Agent with a read-only get_order tool and a policy search tool drafts a reply. The draft goes to Slack with Approve/Reject buttons; only on approval does a Gmail node send it. "Other" goes straight to a human queue. An error workflow alerts the team, and each run logs its category and token use.
A complete AI workflow
A real automation combines a trigger, validation, AI steps, human approval and error handling.
The workflow on one page
Each line maps to a section of this course.
Gmail Trigger (Sec 2)
-> Code: clean + clip body (Sec 3)
-> Text Classifier: billing | technical | other (Sec 4)
-> AI Agent (tools: get_order, search_policy) (Sec 4, 5)
-> Slack: Approve / Reject draft (Sec 6)
-> Gmail: send reply (only if approved) (Sec 6)
-> other: human queue ; failures: Error workflow (Sec 6)
Hosting: Docker Compose, HTTPS, git-backed JSON (Sec 7)Quick check: Why does the case study require approval before sending the reply?
- Emails cannot be sent otherwise
- Slack requires it
- Sending is an outward action that is hard to undo and model output may be wrong
- It makes the model faster
Answer
Sending is an outward action that is hard to undo and model output may be wrong — A human check catches wrong or risky drafts before a customer sees them.