---
name: gmail-inbox-triage-digest
description: "Weekday mornings: everything that landed in your Gmail inbox overnight, sorted into needs a reply, worth knowing, and safe to archive. Use when the user asks for this, or when it runs on a schedule."
---

# Gmail inbox triage digest

Weekday mornings: everything that landed in your Gmail inbox overnight, sorted into needs a reply, worth knowing, and safe to archive.

Most mornings the inbox holds five emails that matter and thirty that don't, and finding the five means reading all thirty-five. Gmail's tabs catch the promotions; they don't know that the investor email in Primary wants numbers by Friday.

The agent reads the last day of mail, sorts each thread into reply, FYI or archive, and writes the ask behind every reply in one line. You start the day with the five, and the thirty can wait or go.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- Read access to the mailbox: a Gmail connector or MCP server, or a Google OAuth client with the `gmail.readonly` scope.
- The `gmail.modify` scope too, only if you want the agent to archive or label threads after you say so.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Collect the last day of mail** (Gmail): Call `users.threads.list` with `q: "in:inbox newer_than:1d -category:promotions -category:social"` (`newer_than:3d` on Mondays), then `users.threads.get` with `format: metadata` and the `From`, `To`, `Cc`, `Subject` and `List-Unsubscribe` headers, plus each thread's `snippet`.
2. **Sort into three piles**: Reply: a person wrote to you directly (you are in To) with a question, a request or a date. FYI: you are in Cc, or it is a status, a calendar change or a receipt worth knowing about. Archive: bulk mail with `List-Unsubscribe`, notifications and automated alerts.
3. **Read the reply pile properly** (Gmail): For threads in the reply pile, fetch the latest message with `format: full` and write the ask in one line with any deadline. Put people you have written to before first: a search for `from:me to:{sender}` returns results.
4. **Write the digest**: Counts per pile, the reply list with sender, subject and ask, a one-line FYI summary, and the archive pile grouped by type.

## Route B: the browser

### What you need

- Signed in to the Gmail account in the browser; the inbox opens with no further setup. For Google Workspace accounts, the agent works inside whatever the admin allows for that mailbox.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://mail.google.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Search the last day**: In the Gmail search box type `in:inbox newer_than:1d -category:promotions -category:social` (`newer_than:3d` on a Monday) and press Enter. Read the list: sender, subject and the preview line are enough for a first sort.
2. **Sort each thread**: Reply: a person wrote to you by name with a question, a request or a date. FYI: you are in Cc (hover the sender, or open the thread and click **Show details**), or it is a status, a calendar change or a receipt. Archive: anything with an **Unsubscribe** link next to the sender, notifications and automated alerts.
3. **Open the reply pile**: Open each thread in that pile and read the latest message. Write the ask in one line with any deadline. To put known contacts first, search `from:me to:<sender>`; a non-empty result means you have written to them before.
4. **Write the digest**: Counts per pile, the reply table (sender, subject, ask), one line for FYI and the archive pile grouped by type. Nothing is archived, labeled or answered.

Note: Gmail shows 50 threads per page by default; on a heavy inbox the agent pages with the arrows at the top right. Search results list threads, and a thread matches if any message in it does, so a thread you answered last night can still appear.

## The report

- How many threads need a reply, are FYI, or can be archived.
- **Needs a reply**: sender, subject and the ask in one line, with deadlines.
- **FYI**: one line covering the rest worth knowing.
- **Can be archived**: grouped by type (newsletters, notifications, receipts).

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "gmail-inbox-triage-digest/<date of this run, e.g. 2026-10-16>",
  "item_key": "gmail-inbox-triage-digest",
  "project": "Inbox",
  "source": "Gmail inbox triage digest skill",
  "kind": "update",
  "title": "5 emails need a reply this morning",
  "summary": "**5** need a reply, **9** are FYI and **23** can be archived from the last 24 hours.",
  "widget": [
    {
      "type": "Text",
      "props": {
        "text": "Needs a reply",
        "variant": "heading"
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "From",
          "Subject",
          "The ask"
        ],
        "rows": [
          [
            "Dana Whitfield",
            "Q3 update: two questions",
            "Burn and hiring plan by Friday"
          ],
          [
            "Luis Ortega",
            "Contract redlines",
            "Sign-off on clause 7 before he sends it"
          ],
          [
            "Priya Raman",
            "Intro: Acme and Fieldstone",
            "A time for a call next week"
          ],
          [
            "Kestrel Design",
            "Export broken since Monday",
            "A fix date; waiting 2 days"
          ],
          [
            "Ellen Park (accountant)",
            "September close",
            "Receipts for 3 card charges"
          ]
        ]
      }
    },
    {
      "type": "Text",
      "props": {
        "text": "FYI: comments on the board deck from Sam, an AWS billing alert, 4 calendar changes, payroll processed for Oct 15, and 2 customer replies support already answered.",
        "variant": "muted"
      }
    },
    {
      "type": "Badges",
      "props": {
        "items": [
          {
            "label": "Newsletters 11"
          },
          {
            "label": "Notifications 8"
          },
          {
            "label": "Receipts 4"
          }
        ]
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Weekdays at 7:45 (`45 7 * * 1-5`). From cron, with the agent signed in on that machine:

```bash
45 7 * * 1-5 claude -p "Run the gmail-inbox-triage-digest skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/gmail-inbox-triage-digest#schedule

Source: https://briefkin.dev/skills/gmail-inbox-triage-digest
