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.
Intelligent email classification using AI reasoning for smart inbox organization.
Unlike pattern-based filtering, AI classification analyzes email content, sender context, and user behavior to make intelligent categorization decisions.
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
| 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 |
gog gmail search 'newer_than:${DAYS}d -label:classified' --json
Exclude already-classified emails to avoid re-processing.
For each email, analyze:
Sender Analysis
Subject Analysis
Content Indicators
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 |
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>
## 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`
newsletter@, digest@, weekly@Preview classifications without applying:
/gmail-classify --dry-run
Shows what would be classified without making changes.
references/categories.md - Detailed category definitions/gmail-analyze - Pattern analysis (faster, simpler)/gmail-filter - Create permanent rules from classifications