Three-times-daily inbox brief. Classify unread Gmail inbox messages by priority, render an HTML report, ping #bt-ops in Slack, store everything permanently for archive search.
| Worker | URL | Purpose |
|---|---|---|
bt-email-monitor | bt-email-monitor.jason-8ce.workers.dev | Main cron + report viewer + search |
bt-email-monitor-auth | bt-email-monitor-auth.jason-8ce.workers.dev | One-shot OAuth helper (delete after setup) |
bt-email-monitor · UUID 41e649dc-9f21-46d3-afce-3e390dcee77a. Tables: emails, reports, senders, run_state, plus FTS5 virtual table emails_fts. Nothing ever deletes. Every report and email metadata persists forever for search.
ANTHROPIC_API_KEY — pulled from Apple NotesRUN_TOKEN — for programmatic /run triggersRequired so the worker can read your inbox.
bt-email-monitor.bt-email-monitorjason@bosstorque.aijason@bosstorque.aibt-email-monitorhttps://bt-email-monitor-auth.jason-8ce.workers.dev/callbackThe email monitor authenticates against bt-notify /send with a bearer token. To rotate it cleanly (both workers get the same value), run in Terminal:
TOKEN=$(openssl rand -hex 32)
echo "$TOKEN" | /usr/local/bin/wrangler secret put NOTIFY_TOKEN --name bt-notify
echo "$TOKEN" | /usr/local/bin/wrangler secret put NOTIFY_TOKEN --name bt-email-monitor
echo "Token: $TOKEN"
If you already have the token saved, just paste it in chat and I'll set it on bt-email-monitor only.
Restricts the report viewer and search to your Google identity.
bt-email-monitorbt-email-monitor.jason-8ce.workers.devOwner onlyjason@bosstorque.aiDon't protect bt-email-monitor-auth with CF Access — Google OAuth callback can't satisfy it. The auth helper is one-shot anyway; delete after setup.
| URL | Purpose |
|---|---|
| /latest | Redirects to most recent report |
/r/{slug} | Specific report (Slack-linked) |
| /archive | List every past brief |
| /search | Full-text search across every email ever processed |
/run?slot=manual&token=… | Manual trigger (requires RUN_TOKEN) |
| /health | Liveness check (no auth) |
| # | Priority | Detection |
|---|---|---|
| P1 | Sales Conversations | Inbound inquiries, replies to outbound, proposals/quotes, named construction / field-service prospects |
| P2 | Active Client Communications | Existing paying clients (Sperry Tree Care, etc.) |
| P3 | Czech Citizenship | .cz domains, embassy/consulate, attorney Trnka, keywords (občanství, naturalization, MZV, MVCR) |
| P4 | Personal / Operational | Bills, scheduling, vendors needing approval |
| P5 | FYI | Order confirmations, receipts, status updates |
| P6 | Newsletters / System | Hidden by default in report; counted in KPIs |
| Item | Value |
|---|---|
| CF Account ID | 8cef3a20d2c22491d2bbbc594cf4865d |
| D1 Database UUID | 41e649dc-9f21-46d3-afce-3e390dcee77a |
| Main worker | bt-email-monitor |
| OAuth helper | bt-email-monitor-auth (delete after setup) |
| Source code | /tmp/bt-email-monitor/ on this Mac |
| Gmail scope | https://www.googleapis.com/auth/gmail.readonly |
| Gmail query | in:inbox is:unread (strictly inbox) |
| Anthropic model | claude-haiku-4-5-20251001 |
| Cron (UTC) | 0 15 * * *, 0 19 * * *, 0 23 * * * — enabled after validation |