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.

# 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

Travel Planner

Create personalized travel itineraries with day-by-day plans, budget breakdowns, packing lists, and cultural tips based on your preferences.

10 minutes
Beginner
Productivity

Meeting Intelligence System

Process raw meeting notes into clear decisions, action items with owners, and follow-up emails so accountability doesn't evaporate.

5 minutes
Beginner
Productivity

Travel Command Center

Centralize your entire trip in one workspace — itinerary, bookings, packing list, and restaurant picks that all reference each other.

5 minutes
Beginner
Productivity

Year-in-Review Generator

Automatically compile your yearly accomplishments from Jira tickets, git history, emails, and documents into a polished summary for performance reviews or personal reflection.

5 minutes
Beginner
Productivity

I Have ADHD Skill for Claude: ADHD-Shaped Output

The i-have-adhd Claude skill (ayghri/i-have-adhd on GitHub): shape every response for an ADHD reader — lead with the next action, number bounded steps, restate state every turn, suppress tangents, give concrete time estimates, and make wins visible — grounded in five specific facts about how ADHD changes reading, not just 'be brief.'

2 minutes
Beginner
Productivity

Add Integration

Add MCP server integrations.

15 minutes
Intermediate
Productivity

Connect

Set up an MCP connector.

15 minutes
Intermediate
Productivity

Context Engine

Load brand context for marketing tasks.

15 minutes
Intermediate
Productivity

Activity Digest Generator

Generate daily or weekly activity digests across all connected platforms

10 minutes
Beginner
Productivity

Enterprise Search Aggregator

Search across all connected sources with a single unified query

10 minutes
Intermediate
Productivity

AI Life Automation Audit

Conduct a comprehensive life audit across 9 domains — career, side hustles, finances, health, relationships, and more — then get a prioritized automation map with step-by-step implementation guides.

5 minutes
Beginner
Productivity

Connect Apps

Enable Claude to integrate with 1,000+ external applications to perform real actions like sending emails, creating issues, and posting messages.

5 minutes
Beginner

Browse all Productivity playbooks →