The challenge
The founder’s inbox was mostly automated mail and newsletters, so the messages that mattered were buried. High-priority messages could sit for days with nobody noticing, and leads that had gone quiet slipped away because nobody tracked who had not been contacted in weeks.
Replies took time and had to sound like the founder, not a generic assistant. Two technical issues sat underneath: Gmail push subscriptions expire, which silently stops new mail arriving, and syncing weekly digests into Coda hit API rate limits, especially right after clearing old rows.
What I built
Slack and Gmail come in in real time through Slack Events and Gmail Pub/Sub push notifications. An eight-layer heuristic filter, using headers, categories and sender patterns, removes automated mail before it reaches the database, so the AI only works on messages a person sent.
Black-hole detection flags high-priority messages unanswered for 48 hours, and Claude pre-drafts a reply against the founder’s own triage rules. A voice engine seeded from the founder’s Gmail sent history keeps drafts in their writing style. Drafts can be sent or redrafted from Coda or the web dashboard.
A scheduled daily briefing in four parts (action required, meetings and scheduling, information only, junk and low priority) goes to a private Slack channel. A weekly reconnect digest ranks leads with no outbound email in 45 days and has Claude draft the follow-up, with Coda sync using batched writes, throttling and retries on rate limits. There is also an on-demand query endpoint for asking questions about past communications, with the client roster in the prompt.
Gmail watch subscriptions renew automatically every six days, and a resumable archive backfill loads historical mail safely. The dashboard API is protected with Supabase JWT and an email allow-list.
Architecture and stack
- AI
- Anthropic Claude API
- Backend
- Node.js · Google Cloud Functions Framework · Google Cloud Pub/Sub · node-cron · Render
- Data
- Supabase (PostgreSQL) · Supabase Auth
- Integrations
- Slack Web and Events APIs · Gmail API · Coda API
- Frontend
- React 19 · TypeScript · Vite
Outcome
The founder sees what needs a reply instead of scrolling past automated mail, and important messages no longer sit unanswered without anyone knowing. Replies start as drafts in their own voice, and stalled leads come back as a ranked weekly list with suggested emails.
The quiet failure modes are handled too: subscriptions renew themselves, rate limits are absorbed with retries, and the AI is grounded in the founder’s real messages and rules rather than generic advice.
Last updated