Automate a Gmail digest and send it to Slack

Codex can gather unread mail each morning, sort it by priority, and post a Slack recap.

Done with Codexยท Intermediate

What they did
The poster created a scheduled Codex workflow for a morning update. Each run looks at unread Gmail from a recent local-time range, gathers message details, classifies every email into a fixed set of triage buckets, and removes newsletters and sales mail from the main brief. When the review is done, it posts a DM in Slack and then waits for the user before doing anything else.
How it went
The end product is a daily Slack recap with unread messages grouped by category plus a separate count of filtered newsletters and sales emails. The setup is meant for a non-coding job, and no usage totals or measured outcomes were reported. The poster also found that Gmail maxResults could trigger intermittent 500 errors, so the agent should page through results instead.
Tips
Keep the first pass read-only, and make the agent pause before any action that would send, delete, archive, or submit something. If Gmail is involved, prefer pagination over maxResults to avoid the reported 500 errors.

Try it yourself with Codex

Each [weekday/day] at [time] in [timezone], review my unread Gmail from [start point] up to now. For each message, capture the key metadata you need, classify it into [triage categories], and exclude [newsletters/sales/other filters] from the main brief. Send a concise summary to my [Slack channel or DM] with counts for each category and a separate total for filtered messages. Do not reply to, archive, delete, or submit any email. Before any action that would send, remove, archive, or otherwise change mail, stop and ask for my approval. Show me a sample summary first, then wait for confirmation before scheduling this. Use pagination for Gmail results instead of maxResults.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Read the original on reddit.com โ†—

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.