ARTENIS ALIJA
Automation · Gmail API · Python6 min read5 February 2025

From 2 Hours of Email to 15 Minutes: An Automation Case Study

A walkthrough of the Gmail automation system I built — triage, priority labelling, templated replies, and the edge cases that nearly broke it.

The client was spending two hours daily on email — reading, sorting, and replying to a high volume of inbound inquiries. Not all of it was reducible to automation. But a large portion was pattern-matching: the same 12 question types, 80% of which had a standard answer.

Phase one was classification. Fine-tuned a small classifier on 6 months of archived email, got to 91% accuracy on intent detection after three rounds of active learning. The output feeds into a routing system: sales inquiries go one place, support requests another, billing to a third queue.

Phase two was templated replies. For the high-confidence categories (confidence > 0.88), the system drafts a reply and drops it in a 'review' label. The client reads the draft, clicks send. The cognitive overhead drops from 'compose a reply' to 'approve or edit.' That's the leverage point.

Edge cases were the expensive part: multi-topic threads, sarcastic subject lines, emails that looked like category X but were actually category Y. Building a graceful fallback path — 'not sure, flag for human' — was as important as the happy path.