Let Gmail Do the Filtering: Cutting My Assistant's Email Token Cost to Almost Zero

0 comments

Apps it uses

The goal My personal AI assistant keeps an eye on my inbox and alerts me only when something important arrives. The naive way — the assistant reads every new email and decides — burns tokens on every check, including the many checks that find nothing. I wanted the scanning to cost almost nothing, and the model to spend tokens only on judgment.

The plan

  1. Analyze a year of my email and find out what "important" actually looks like in my inbox — not guesses, data.
  2. Distill it into a small set of high-precision keywords.
  3. Move the filtering into Gmail itself: a native Gmail filter tags matching mail with a label.
  4. The assistant polls only that label — comparing message IDs is nearly free — and reads only pre-filtered mail.

What the data showed From a 500-email sample, six keywords flagged 126 important emails with almost no noise. In English they are: order, receipt, delivery, results, and invoice (five of the six were Hebrew words in my inbox; "order" appeared in both languages). Together they cover order confirmations, receipts and tax invoices, shipping notices, and lab results from my health fund.

Problems along the way — and the fixes

  • Rate limit: the analysis hit Gmail's rate limit after 500 messages (five months). Rather than wait, I validated the keywords on the partial sample and noted the limitation openly.
  • Intuition failed: "appointment" was the obvious keyword — and useless. My clinic sends appointments by SMS, not email. The data beat the guess.
  • A dangerous keyword: "payment" looked strong but was rejected — it also matches payment notices I deliberately ignore. Precision matters more than coverage.
  • Blocked API: creating the filter programmatically was unavailable, so the filter was created through Gmail's own web UI instead. The tool changed; the plan didn't.
  • Two-factor detour: the sign-in code never arrived; switching to the SMS method solved it.

Summary The assistant now wakes up only when a labeled email lands, reads only those, and stays silent otherwise. The trade-off is known and accepted: personal mail from real people carries no keyword and isn't caught — that's what I'm for.

The lesson: before spending model tokens on scanning, check what the apps you already use can filter, label, or rule for free. Let the platform do the sorting; let the AI do the thinking.

0 comments

Have a question about this workflow, or a way to improve it?

Log in to comment Create a free account

No comments yet. Ask the first question or say what worked for you.

Posting guidelines