The email pipeline fetches Outlook emails via the MS Graph API, classifies them by project, generates summaries, and stores the results in email.db. See 09-integrations/email for the full integration reference.
MS Graph API --> Fetch last 2 days of emails
|
v
inbox-rules.md --> Filter newsletters / noise
|
v
Gemini Flash --> Classify to project + summarize
|
v
email.db --> Insert metadata + summary
|
v
email_attachment_sync.py --> Download attachments (best-effort)
email-sync/home/lucienne/workspace/tasks/email-sync.md0 7 * * 1-5 (07:00 UTC = 09:00 SAST, weekdays)claude -p) with a structured prompt that reads the email-index skill and performs each stepgraph_api.py at ~/workspace/scripts/graph_api.pylist-messages --since <2 days ago>internetMessageId, conversationId, subject, from, receivedDateTime, body, hasAttachments~/workspace/cowork/context/inbox-rules.md*@zapiermail.com).email-sender-map.json, built from existing email.db data)query.py insert command~/workspace/email.db (SQLite)internet_message_id (RFC standard -- survives email moves/archive)email_attachment_sync.py --message-id <graph_message_id>A separate script handles enriching existing records:
~/workspace/scripts/email_backfill.pyinternet_message_idThe email-index skill provides the query interface:
python ~/.claude/skills/email-index/query.py project "Project Heron"
python ~/.claude/skills/email-index/query.py search "MOI harith"
python ~/.claude/skills/email-index/query.py sender "stephan.spamer"
python ~/.claude/skills/email-index/query.py recent --limit 10
python ~/.claude/skills/email-index/query.py stats
All queries run on Luci via SSH over Tailscale. Access from other machines uses the email-index skill which handles the SSH connection.
| File | Purpose |
|---|---|
.email-sync-state.json |
Tracks last sync date |
.email-sender-map.json |
Cached sender-to-project mapping |
~/.graph-api-token.json |
MS Graph API OAuth token |
notify_on: failure sends a Telegram alertinternet_message_id is the stable primary key -- it never changes even when emails are moved or archivedMission Control is the board for your delegated work: requests come in, Luci coordinates the next step, and evidence stays visible for review.
Luci is your always-on assistant for routing, status updates, and follow-through. Operators can still open deeper evidence when needed.