AI Email Assistant: Inbox Zero with Local and Open-Source Tools
Inbox zero comes from layered rules plus a human gate, not from a smarter model. Open source keeps mail on your own machine at the cost of maintenance. Three routes, one minimal implementation, four common failures.
📜 Table of Contents
AI Email Assistant: Inbox Zero with Local and Open-Source Tools
Inbox zero comes from layered rules plus a human gate, not a smarter model. Open source keeps mail on your own machine at the cost of maintenance.
Three routes
| Route | Data path | Maintenance | Fits |
|---|---|---|---|
| hosted assistant | mail through a third-party model | none | convenience first |
| self-hosted app | your server, your model | medium | sensitive mail |
| your own script | fully controlled | high | custom rules, audit |
Among open-source apps, inbox-zero is mature: connect Gmail, auto-archive noise, draft in your voice, summarise threads, self-host with your own API key. n8n handles scheduling and rules.
A minimal implementation
- Pull unread over IMAP; read-only for the first week.
- Pre-classify with rules: sender domain,
List-Unsubscribeheader, keywords. - Send the rest to a model that returns fixed JSON.
- Write labels or folders back; put drafts in the drafts folder.
- A human approves sending.
r = ollama.chat(model="qwen3:8b", format="json", messages=[{
"role": "user",
"content": "Classify as inquiry/report/notice/spam and say whether a human reply is needed. JSON only.\n" + text[:6000]}])
Run read-only for a week and check the classifications by hand before granting write access.
How detailed should rules be
Marketing mail carries List-Unsubscribe; contacts belong in the inbox; invoices and contracts get a finance label; threads you already answered three times get archived. Rules cover well over half the volume, and the model only handles ambiguity. Doing it the other way round costs more and misfires.
Drafts need examples
Give three to five of your own past emails as style samples; that beats any adjective in the prompt. Demand plain text, no placeholders, a length cap. For Chinese mail, supply Chinese samples or you get mixed-language output. Always review before sending to customers and partners.
Privacy trade-offs
Local models keep mail on the machine and produce weaker long-form drafts. Hosted models draft better and process mail elsewhere. The easiest middle ground routes by sender domain: internal mail local, external mail hosted.
Four common failures
Duplicate replies (unique index on Message-ID), loops (filter your own address, add an auto-submitted header), attachment parsing failures (usually scanned PDFs without OCR), and classification skewed to English (Chinese needs Chinese examples and keywords).
Inbox zero is a mechanism
Process twice a day in batches, never in real time. Carry leftovers to the next batch instead of retrying all day. On Fridays generate an "unanswered" list, usually under ten items.
FAQ
Is it safe? Depends where the model runs, whether transport is encrypted and how much scope you grant. Use the narrowest scopes.
Do drafts sound like me? Closer with samples, still needing edits. Do not auto-send to important contacts.
Chinese mail? Classification works; drafting needs Chinese samples.
Multiple accounts? One credential set per account, never reuse tokens, tag logs with the account.
Note: app capabilities and scopes change; read official docs and privacy terms.
Related
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.