TL;DR: A Codex automation pulls your unread Gmail every morning, runs each email through a 7-category triage system, silently filters newsletters and cold pitches, and drops a clean brief into Slack. The full prompt is below.
The Setup
u/mate_0107 wanted a morning email summary that actually worked. Not a vague “you have 47 unread emails” notification. A real brief: what needs a reply, what’s a meeting invite, what’s just noise.
They built it using Codex and Gmail. The prompt fetches every unread email from the last 24 hours, runs it through a triage taxonomy, and sends a formatted Slack DM. No manual sorting. No skimming subject lines at 8 AM.
The 7-Category System
Every email gets classified into one bucket, first match wins:
- 📋 Needs Reply – real person, direct question or scheduling ask, not a seller
- ⚡ Action Required – sign something, approve something, deadline-driven task
- 📅 Meeting – calendar invite or notes from Calendly, Fireflies, Granola, etc.
- Payment / Finance – invoices, receipts, billing, statements
- FYI – CC’d, informational, status update
- Newsletter – has unsubscribe header and is a recurring sender
- Trying to Sell – unsolicited cold outreach
The last two categories never show up in your brief. They get silently counted at the bottom: “Filtered out: 4 newsletters, 2 sales emails.”
Three Details Worth Stealing
Even if you never touch Codex, the prompt has solid engineering built into it.
Omit maxResults, paginate instead. Avoids intermittent 500 errors from the Gmail API. Small fix, real reliability gain.
Read the full body before classifying ambiguous senders. No snap judgments from subject lines. The AI actually reads before it decides.
A confirmation gate at the end. The AI sends the brief and stops. Nothing happens until you reply with a number. It does not take action autonomously. That matters.
Use Cases
This prompt is most useful for:
- Founders and operators managing 50+ emails a day who need the 5 that actually matter
- Anyone running multiple inboxes who wants one clean Slack touchpoint each morning
- People who tried AI email summaries before and found them too vague to act on
Prompt of the Day
Swap in your name, your email, and your local time window. Everything else is plug-and-play.
Morning Brief
Create the Morning Brief for {your name} and deliver it as a Slack DM to the user. Fetch all unread Gmail messages for {add your email} from yesterday and today using this local-time window: is:unread after: before:. Omit maxResults to avoid intermittent 500 errors; paginate instead. For each email, pull: subject, sender name and address, snippet or body up to about the first 800 words, recipients, threadId, attachment types with .ics flagged, and List-Unsubscribe header. If there are zero results, send this one-line Slack DM to {your name} and stop: "Inbox clear. No unread emails since yesterday 7 AM." Classify using this first-match-wins Email Triage taxonomy:
1. Needs Reply: from a real person; direct question, doc review request, or scheduling ask; not a seller.
2. Action Required: sign or approve, form, PR review, deadline-driven task where the primary ask is not "reply to me".
3. Meeting: .ics attachment, or sender is Google Calendar, cal.com, Calendly, Granola, Fireflies, Gemini Notes, or Fathom.
4. Payment / Finance: keywords invoice, receipt, payment, billing, transaction, statement; or sender is in known finance tools.
5. FYI: CC'd, informational, status update, team announcement.
6. Newsletter: has List-Unsubscribe header or unsubscribe link and sender is recurring, meaning 3+ in 30 days, or in known tools list.
7. Trying to Sell: unsolicited cold outreach. Silent pre-filters: exclude Newsletter and Trying to Sell from the displayed brief, but count them. For ambiguous senders, read the full available body before classifying; never classify from subject line only. Generate a Slack-ready DM in this structure, omitting any section whose count is zero: Good morning, {your name}! Here's your daily email brief. Date: {Weekday, Month DD, YYYY}
Unread emails (last 24 hours): {total count} -------------------------------------------------- Needs Reply ({count}) {Subject line} From: {Full Name} <{email@address.com}> Summary: {1-2 sentence gist of what they're asking} Tip: {One suggested next action -- reply, forward, delegate, etc.} -------------------------------------------------- Action Required ({count}) Same structure as Needs Reply. -------------------------------------------------- Meeting ({count}) Same structure as Needs Reply. Note whether it is an invite or meeting notes. -------------------------------------------------- Payment / Finance ({count}) Same structure as Needs Reply. -------------------------------------------------- FYI ({count}) Same structure as Needs Reply, but keep summaries to one line maximum. -------------------------------------------------- Filtered out: {N} newsletters, {N} sales emails -- not shown. -------------------------------------------------- Confirmation gate: Reply with a number, for example "1", or describe the action to proceed. Nothing will be done automatically. Use each email's timestamp to note recency inline, such as "yesterday afternoon" or "arrived overnight", without doing a separate fetch. After sending the Slack DM, take no further action until the user explicitly confirms a next step.
Try It
Run this through Codex with Gmail and Slack connected. Or adapt the triage taxonomy for any LLM with inbox access. The classification logic is the reusable part. The formatting is just presentation.
If it works, convert it into a saved skill so you’re not pasting the prompt every morning.
I found a prompt that makes codex better at summarising my emails
by u/mate_0107 in PromptEngineering