
Gmail Morning Triage and Daily Digest Script
Start each day with a sorted inbox and one summary email. Your AI first studies your real mail patterns with a read-only script, drafts labeling rules for you to approve, then hands you one complete Google Apps Script. It labels every thread by how it reached you and how much it matters, tracks to-dos that clear when you reply, catches signature requests and ads, and emails a digest every morning. #Productivité
A rule-based Gmail triage that runs inside your own Google account every morning: labels, priorities, a self-clearing to-do list and an HTML digest. No third-party server, and no AI reading your mail at runtime.
What it does
- Two separate axes per thread. Route shows how it reached you: Direct, Cc, Group or Auto. Priority shows how much it matters, from P0 (signature or must-read report) to P6 (marketing). A vendor's newsletter and a vendor's outage alert get very different labels.
- Special types handled first: signature requests, a recurring report you name, VIP senders, calendar invites and ads. Important senders are identified before ad detection, so they never land in Ads.
- An Action label that maintains itself. It is added for what needs you and removed when your reply is the last message. Signature threads clear only when the matching "Completed" notice arrives.
- Ads in three layers: your list, senders learned from your own Ads label, and auto-detection from unsubscribe headers.
- A morning digest email: an Action table sorted by priority and age, then today's new mail grouped into sections, with counts in the subject line.
- Safe by design: a dry-run mode, processing only recent untriaged inbox mail, never touching your existing labels, and never triaging its own digest.
Who it's for
Anyone who gets enough work email that important messages get buried: account managers, founders, consultants, team leads. Works for vendor, client or internal mail, and for personal inboxes with VIPs such as family, bank or school.
How it works
- Read-only analysis. You run the included analysis script. It writes a Google Sheet of sender domains, unsubscribe ratios, who you reply to, subject keywords, your existing labels and suggested rules, and changes nothing. With a Gmail connector your AI can read the patterns itself; you can also just paste 50–100 "From | Subject" lines.
- Rule draft. Your AI turns the evidence into a rule table, and you correct and approve it.
- One complete script. The tested template is customized through its settings block only and syntax-checked before you get it.
- Go live. Paste, dry run, first run, color the labels, backfill old mail, install the daily trigger. Step-by-step instructions and a troubleshooting table are included.
What you provide / what you get
You provide: your account type, what the mailbox is for, your most important senders, and the analysis results or a sample of sender and subject lines.
You get: the analysis script, an approved rule table, a customized MorningInboxTriage.gs, and go-live steps.
Example requests
- "Set up morning triage for my work Gmail. Our key suppliers are A and B, and client C must never be missed."
- "Sort my personal Gmail: bank and school mail first, newsletters out of the way, a summary at 7am."
Requirements
A Google account that can use Apps Script (Workspace or personal Gmail). Optional: enable the Gmail API advanced service in the script for label colors and colored stars. Workspace admins can block it, and the rest still works.
Limits
Rule-based (headers and keyword patterns), not AI understanding, so unusual subjects can be misjudged and you will tune the rules over time. Apps Script runtime and Gmail quotas apply, so large backlogs are processed in batches. Colored stars via the API are not officially documented and fall back to a normal star. Gmail does not let scripts reorder how labels are displayed. Use it only on mailboxes you own or administer.

