Home
cd ../playbooks
ProductivityAdvanced

Smart Email Triage

Automate Gmail inbox organization with intelligent classification into newsletters, announcements, expenses, and auto-archive categories.

30 minutes
By communitySource
#email#gmail#inbox-zero#triage#automation#mcp

You have 3,000 unread emails because newsletters, receipts, and notifications bury the messages that actually need your attention. This playbook automates Gmail inbox triage — classifying emails into actionable categories and auto-archiving noise so you only see what matters.

Who it's for: executives drowning in email who need to surface only high-priority messages, entrepreneurs managing multiple business email streams without an assistant, professionals pursuing inbox zero by automating the sorting they currently do manually, remote workers whose inboxes mix personal and work communications, freelancers managing client emails alongside marketing newsletters and notifications

Example

"Set up smart email triage to get my inbox under control" → Email triage pipeline: Gmail API integration with classification rules for newsletters, receipts, notifications, and action-required emails, automatic label and archive rules for low-priority categories, daily digest summary of archived items, priority inbox surfacing only emails needing human response, and weekly email analytics showing volume by category

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add smart-email-triage
# Smart Email Triage

## Your Role
You intelligently classify Gmail emails into labeled categories using header analysis, body scanning, domain patterns, and scoring thresholds — while protecting VIP contacts from auto-triage.

## Required
- Gmail MCP integration
- Config files at `~/.claude-assistant/config/`

## Arguments
- `noapply` — preview classifications without applying labels
- `days:N` — override search window (e.g., `days:14`)

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

Goes beyond Gmail's native filters to intelligently classify emails into labeled categories — newsletters, announcements, expenses, school notices, and auto-archive candidates. Uses header analysis, body scanning, domain patterns, and scoring thresholds with VIP protection for important contacts.


Prerequisites

  • Gmail MCP integration configured in Claude Code
  • Two config files (setup guide below)

Quick Start

Step 1: Set Up Config Directory

mkdir -p ~/.claude-assistant/config ~/.claude-assistant/state ~/.claude-assistant/logs

Step 2: Get Your Gmail Label IDs

Run in Claude Code: "List my Gmail labels and their IDs"

Step 3: Create Config Files

Create ~/.claude-assistant/config/triage-config.md with your label IDs, vendor domains, and thresholds.

Create ~/.claude-assistant/config/email-policy.md with your VIP contact lists and archive rules.

Step 4: Download the Template and Test

Click Download above, save to your working directory, then:

"Triage my inbox — preview only"

Classification Categories

Category Label Read State Archived?
Newsletters @ToRead Unread No
Announcements @Announcements Unread Yes
School notices @School Unread Yes
Expense receipts Expenses-Pending Read Yes
Personal expenses Expenses-Personal Read Yes
Uncertain expenses Expenses-Uncertain Unread Yes
Auto-archive Auto-Archive Read Yes

How Classification Works

  1. Check overrides — sender-specific routing rules applied first
  2. Scan headers — List-Unsubscribe (+2), noreply address (+1)
  3. Scan body — unsubscribe links (+2), generic greetings (+1)
  4. Check domains — newsletter platforms (Substack, Mailchimp), school domains
  5. Apply scoring — newsletter threshold (default >=3), announcement (>=2)
  6. VIP protection — Tier 1/2 contacts never auto-triaged

Config Files

email-policy.md

  • VIP Tier 1: Family, compliance senders — always stay in inbox
  • VIP Tier 2: Collaborators, team members — always stay in inbox
  • Auto-archive rules: Documented Gmail filters as backstop

triage-config.md

  • Label IDs: Gmail internal IDs for each category
  • Vendor domains: Amazon, Uber, etc. for expense detection
  • Scoring thresholds: Adjust classification aggressiveness
  • Override table: Sender-specific routing rules

Usage

"Triage my inbox"                    — Scan and apply labels
"Triage my inbox — preview only"     — Preview without applying
"Triage my inbox — last 14 days"     — Extended lookback
"Triage my inbox — limit 20"         — Process only 20 emails

Smart Features

  • Adaptive search windows — adjusts lookback based on when you last ran it
  • Classification overrides — sender-specific rules that bypass scoring
  • Auto-filter creation — creates Gmail filters for high-confidence patterns
  • Deduplication — tracks processed emails to avoid re-scanning
  • Expense detection — routes receipts to the right expense category

Tips

  • Start with preview mode — run with "preview only" until you trust the classifications
  • Build overrides gradually — add sender-specific rules as you spot misclassifications
  • VIP list is sacred — important contacts are never auto-triaged
  • Run daily or after travel — keeps inbox manageable

Troubleshooting

Emails misclassified Add the sender to the classification overrides table in triage-config.md

Too aggressive archiving Raise the scoring thresholds in triage-config.md

VIP emails getting triaged Add the contact to Tier 1 or Tier 2 in email-policy.md

"Label not found" errors Re-run the label ID retrieval — Gmail IDs can change

$Related Playbooks

Productivity

System Performance Diagnostics

Run comprehensive performance checks to diagnose why your computer is running slow and get prioritized fixes.

5 minutes
Beginner
Productivity

Workflow Clone System: Automate Your Work With Claude

Audit your recurring work, turn each process into a reusable skill, map it visually, and deploy it, so your processes live in specs instead of in your head

10 minutes
Beginner
Productivity

AI Prompt Builder

Turn rough ideas into optimized, high-performance prompts for any AI model — eliminates ambiguity, adds the right context, and structures output expectations so you get better results on the first try.

5 minutes
Beginner
Productivity

Recall

Recall marketing learnings.

15 minutes
Intermediate
Productivity

Validate Output

Validate content structure.

15 minutes
Intermediate
Productivity

Verify Claims

Verify marketing claims.

15 minutes
Intermediate
Productivity

Weather-Based Automation

Automate weather-based workflows, forecasts, alerts, and location-aware notifications

10 minutes
Intermediate
Productivity

Prompt Auditor & Refiner

Audit existing prompts against quality checklists for substance and structure, then output targeted improvements without rewriting from scratch.

5 minutes
Intermediate
Productivity

Calendar & Schedule Optimizer

Analyze your calendar to find time waste, optimize meeting load, and redesign your week for strategic priorities.

10 minutes
Intermediate
Productivity

Prompt Engineer & Execute

Turn casual, conversational requests into structured prompts with automatic depth calibration, then execute them immediately.

5 minutes
Beginner
Productivity

Quarterly Goals Tracker

Track quarterly objectives with progress scoring, evidence gathering from multiple sources, and interactive deadline management.

15 minutes
Intermediate
Productivity

Raffle Winner Picker

Randomly select winners from Google Sheets, CSVs, or lists for giveaways with transparent, verifiable selection.

5 minutes
Beginner

Browse all Productivity playbooks →