Gmail Daily Digest
One categorized, nicely-formatted snapshot of your unread Gmail, delivered to your InTouch inbox — instead of scrolling the whole pile yourself.
What it does
- fetch-unread — the Google Workspace tool lists your unread Gmail as JSON (sender, subject, date, labels). It's a metadata pull only: nothing is opened in full, marked read, labeled, or deleted.
- categorize-and-summarize — Claude reads that list and returns a single self-contained HTML document: a clean table with one row per message and columns # · From · Subject · Category · Priority · Action Suggestion. The prompt pins the exact markup and styling (green header, zebra rows) so the digest renders identically every run.
- send-digest — the HTML lands in your InTouch inbox as
bodyType: html, so the UI renders the formatted table rather than showing raw tags.
No scripting, no HTML hand-assembly — the GW tool reads, the AI categorizes and formats.
Setup
1. Credentials
<<GOOGLE_WORKSPACE_CREDENTIAL>>— a Google Workspace credential with Gmail read access. (Read-only is enough; this workflow never modifies your mailbox.)<<ANTHROPIC_CREDENTIAL>>— an Anthropic API key credential.
2. Placeholders in workflow.yaml
<<NOTIFY_PUBLISHER>>— who receives the digest (e.g.intouch).
3. Run it
- Scheduled — attach a daily schedule (e.g. 7:00am) for a hands-off morning inbox briefing.
- On demand — run it whenever you want a current snapshot.
To widen or narrow what it pulls, edit the fetch-unread args (e.g. is:unread newer_than:1d --max 25 --results-only).
Provider flexibility
The categorize step uses the anthropic tool, but it's pure reasoning — swap it for openai, gemini, or a local ollama model by changing the tool name and credential. The prompt (and the HTML it produces) stays the same. A local model keeps your mail metadata entirely on your network.
What it won't do
- Read full message bodies. It works from the unread list (sender/subject/date/labels), not the message contents — fast, cheap, and privacy-preserving. For deep per-message analysis use a dedicated workflow (e.g.
phishing-check). - Touch your mailbox. It only reads metadata and reports — read-only Gmail scope is sufficient; it never marks read, labels, archives, or deletes.
- Page through unlimited mail. It digests the first
--maxunread (default 10) so the table stays a one-screen briefing. Raise--maxif you want more.
AI cost
One run is a single Claude call on a compact unread list — typically 1–3k prompt tokens plus ~1k response tokens. A fraction of a cent per digest on Claude Sonnet.