Gmail AI Classifier
Intelligent email classification using AI reasoning for smart inbox organization.
Overview
Unlike pattern-based filtering, AI classification analyzes email content, sender context, and user behavior to make intelligent categorization decisions.
Usage
Syntax: /gmail-classify [days]
Examples:
/gmail-classify # Classify last 7 days
/gmail-classify 30 # Classify last 30 days
/gmail-classify --dry-run # Preview without applying
Classification Categories
| Category |
Indicators |
Label |
| Newsletter |
Substack, Mailchimp, "unsubscribe" link |
Newsletters |
| Shopping |
Order confirmation, shipping, tracking |
Shopping |
| Work |
Company domain, professional tone |
Work |
| Personal |
Personal contacts, casual tone |
Personal |
| Notifications |
GitHub, Slack, calendar alerts |
Notifications |
| Receipts |
Invoice, payment, receipt keywords |
Finance/Receipts |
| Promotions |
Discount, sale, marketing language |
Promotions |
Classification Workflow
Step 1: Fetch Emails
gog gmail search 'newer_than:${DAYS}d -label:classified' --json
Exclude already-classified emails to avoid re-processing.
Step 2: Analyze Each Email
For each email, analyze:
Sender Analysis
- Domain reputation (newsletter service? company?)
- Sender name format (person vs system)
- Reply-to address
Subject Analysis
- Keywords (order, invoice, newsletter, etc.)
- Format (numbered list? FW:? RE:?)
- Tone (formal, casual, marketing)
Content Indicators
- Unsubscribe link presence
- Tracking numbers
- Financial amounts
- Personal greetings
Step 3: Classify with Confidence
Assign category with confidence level:
| Confidence |
Threshold |
Action |
| High (90%+) |
Strong signals |
Auto-apply label |
| Medium (70-89%) |
Mixed signals |
Apply with note |
| Low (<70%) |
Unclear |
Skip, flag for review |
Step 4: Apply Labels
For high-confidence classifications:
# Ensure label exists
gog gmail labels list --json
gog gmail labels create "CategoryName"
# Apply label
gog gmail modify <message-id> --add-label <label-id>
Step 5: Report Results
## Classification Report
**Period**: Last 7 days
**Emails Analyzed**: 142
**Classifications Made**: 128
**Skipped (low confidence)**: 14
### Summary by Category
| Category | Count | % of Total |
|----------|-------|------------|
| Newsletters | 45 | 35% |
| Notifications | 32 | 25% |
| Shopping | 18 | 14% |
| Work | 15 | 12% |
| Personal | 12 | 9% |
| Receipts | 6 | 5% |
### High-Confidence Classifications (Auto-labeled)
- 98 emails across all categories
### Low-Confidence (Manual Review Needed)
1. "Meeting notes from John" - Work or Personal?
2. "Your weekly summary" - Newsletter or Notification?
...
### Suggested Filters
Based on this analysis, create permanent filters:
1. `/gmail-filter create @substack.com Newsletters --archive`
2. `/gmail-filter create @github.com Notifications`
Classification Signals
Newsletter Signals
- Sender:
newsletter@, digest@, weekly@
- Domains: substack.com, mailchimp.com, beehiiv.com
- Content: "unsubscribe", "view in browser"
- Subject: "Weekly", "Digest", "Newsletter"
Shopping Signals
- Subject: "order", "shipped", "delivered", "tracking"
- Sender: orders@, shipping@, noreply@
- Content: Order numbers, tracking links
Work Signals
- Sender: Company domain match
- Content: Project names, professional terminology
- CC: Multiple company addresses
Personal Signals
- Sender: In contacts, personal domain
- Content: Casual language, personal topics
- No marketing footers
Notification Signals
- Sender: notifications@, alerts@, noreply@
- Subject: [GitHub], [Slack], calendar patterns
- Content: Action buttons, status updates
Receipt Signals
- Subject: "receipt", "invoice", "payment"
- Content: Dollar amounts, transaction IDs
- Sender: billing@, receipts@
Dry Run Mode
Preview classifications without applying:
/gmail-classify --dry-run
Shows what would be classified without making changes.
Error Handling
- No emails found: Suggest widening date range
- Label creation fails: Check permissions
- API rate limit: Pause and resume
- Classification uncertain: Flag for user review
See Also
references/categories.md - Detailed category definitions
/gmail-analyze - Pattern analysis (faster, simpler)
/gmail-filter - Create permanent rules from classifications
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: gmail-classify3description: AI-powered email classification using intelligent content analysis. Categorizes emails into Newsletter, Shopping, Work, Personal, Notifications, Receipts, and Promotions. Use for smart inbox organization beyond simple pattern matching. Use when this capability is needed.4---56# Gmail AI Classifier78Intelligent email classification using AI reasoning for smart inbox organization.910## Overview1112Unlike pattern-based filtering, AI classification analyzes email content, sender context, and user behavior to make intelligent categorization decisions.1314## Usage1516**Syntax**: `/gmail-classify [days]`1718**Examples**:19```20/gmail-classify # Classify last 7 days21/gmail-classify 30 # Classify last 30 days22/gmail-classify --dry-run # Preview without applying23```2425## Classification Categories2627| Category | Indicators | Label |28|----------|------------|-------|29| Newsletter | Substack, Mailchimp, "unsubscribe" link | Newsletters |30| Shopping | Order confirmation, shipping, tracking | Shopping |31| Work | Company domain, professional tone | Work |32| Personal | Personal contacts, casual tone | Personal |33| Notifications | GitHub, Slack, calendar alerts | Notifications |34| Receipts | Invoice, payment, receipt keywords | Finance/Receipts |35| Promotions | Discount, sale, marketing language | Promotions |3637## Classification Workflow3839### Step 1: Fetch Emails4041```bash42gog gmail search 'newer_than:${DAYS}d -label:classified' --json43```4445Exclude already-classified emails to avoid re-processing.4647### Step 2: Analyze Each Email4849For each email, analyze:50511. **Sender Analysis**52 - Domain reputation (newsletter service? company?)53 - Sender name format (person vs system)54 - Reply-to address55562. **Subject Analysis**57 - Keywords (order, invoice, newsletter, etc.)58 - Format (numbered list? FW:? RE:?)59 - Tone (formal, casual, marketing)60613. **Content Indicators**62 - Unsubscribe link presence63 - Tracking numbers64 - Financial amounts65 - Personal greetings6667### Step 3: Classify with Confidence6869Assign category with confidence level:7071| Confidence | Threshold | Action |72|------------|-----------|--------|73| High (90%+) | Strong signals | Auto-apply label |74| Medium (70-89%) | Mixed signals | Apply with note |75| Low (<70%) | Unclear | Skip, flag for review |7677### Step 4: Apply Labels7879For high-confidence classifications:8081```bash82# Ensure label exists83gog gmail labels list --json84gog gmail labels create "CategoryName"8586# Apply label87gog gmail modify <message-id> --add-label <label-id>88```8990### Step 5: Report Results9192```93## Classification Report9495**Period**: Last 7 days96**Emails Analyzed**: 14297**Classifications Made**: 12898**Skipped (low confidence)**: 1499100### Summary by Category101102| Category | Count | % of Total |103|----------|-------|------------|104| Newsletters | 45 | 35% |105| Notifications | 32 | 25% |106| Shopping | 18 | 14% |107| Work | 15 | 12% |108| Personal | 12 | 9% |109| Receipts | 6 | 5% |110111### High-Confidence Classifications (Auto-labeled)112- 98 emails across all categories113114### Low-Confidence (Manual Review Needed)1151. "Meeting notes from John" - Work or Personal?1162. "Your weekly summary" - Newsletter or Notification?117...118119### Suggested Filters120121Based on this analysis, create permanent filters:1221. `/gmail-filter create @substack.com Newsletters --archive`1232. `/gmail-filter create @github.com Notifications`124```125126## Classification Signals127128### Newsletter Signals129- Sender: `newsletter@`, `digest@`, `weekly@`130- Domains: substack.com, mailchimp.com, beehiiv.com131- Content: "unsubscribe", "view in browser"132- Subject: "Weekly", "Digest", "Newsletter"133134### Shopping Signals135- Subject: "order", "shipped", "delivered", "tracking"136- Sender: orders@, shipping@, noreply@137- Content: Order numbers, tracking links138139### Work Signals140- Sender: Company domain match141- Content: Project names, professional terminology142- CC: Multiple company addresses143144### Personal Signals145- Sender: In contacts, personal domain146- Content: Casual language, personal topics147- No marketing footers148149### Notification Signals150- Sender: notifications@, alerts@, noreply@151- Subject: [GitHub], [Slack], calendar patterns152- Content: Action buttons, status updates153154### Receipt Signals155- Subject: "receipt", "invoice", "payment"156- Content: Dollar amounts, transaction IDs157- Sender: billing@, receipts@158159## Dry Run Mode160161Preview classifications without applying:162163```164/gmail-classify --dry-run165```166167Shows what would be classified without making changes.168169## Error Handling170171- **No emails found**: Suggest widening date range172- **Label creation fails**: Check permissions173- **API rate limit**: Pause and resume174- **Classification uncertain**: Flag for user review175176## See Also177178- `references/categories.md` - Detailed category definitions179- `/gmail-analyze` - Pattern analysis (faster, simpler)180- `/gmail-filter` - Create permanent rules from classifications181182---183> Converted and distributed by [TomeVault](https://tomevault.io/claim/corentinlumineau) — claim your Tome and manage your conversions.184<!-- tomevault:4.0:skill_md:2026-04-15 -->