Load when user says "process emails", "triage inbox", "email automation", "check emails", or "inbox zero"
Purpose: Automatically triage your inbox, draft responses, and recommend actions (archive, snooze, create task).
"Process my emails"
"Triage my inbox"
"Help me with email zero"
"Process last 50 emails"
"Check emails from last 3 days"
"Draft responses only"
The Gmail API returns individual messages, not threads. A 200-message inbox may only be ~70 unique threads. Always deduplicate by thread_id before presenting results or counting:
from collections import defaultdict
threads = defaultdict(list)
for e in emails:
threads[e['thread_id']].append(e)
# Use threads dict for counting and display
For each email, AI analyzes:
Shows summary table:
EMAIL TRIAGE RESULTS (25 emails processed)
│ # │ FROM │ SUBJECT │ ACTION │ DRAFT? │
├───┼───────────────────┼────────────────────────────┼──────────────┼─────────┤
│ 1 │ [email protected] │ RPO Pipeline Update │ RESPONSE │ ✅ Ready │
│ 2 │ linkedin │ Job recommendations │ ARCHIVE │ │
│ 3 │ [email protected] │ Q1 metrics check-in │ SNOOZE (Mon) │ │
User can then:
URGENT (needs immediate response within 24h):
RESPONSE NEEDED (reply within 2-3 days):
TASK (create Notion task):
ARCHIVE (no action needed):
SNOOZE (defer):
Drafts use your communication style:
Example draft:
Hi Sarah,
Great update on the RPO pipeline. The 3 new leads look promising.
Let's sync Friday 2pm to review the Zurich proposal. I'll send a calendar invite.
Jonas
1. Run: "Process my emails"
2. Wait ~30-60 seconds (AI processes each email)
3. Review: Table with recommendations
4. Approve: "Execute all" or review individually
5. Done: Drafts saved, emails archived/snoozed
1. Run: "Draft responses only"
2. AI generates drafts for emails needing replies
3. Review: Drafts shown one by one
4. Edit/approve each draft
5. Done: Drafts saved to Gmail drafts folder
1. Run: "Quick email scan"
2. AI shows summary only (no drafts)
3. Highlights urgent items
4. Done: You decide what to action
Task Creation:
Project Linking:
Superhuman uses a custom Gmail label for snoozes — not Gmail's native snooze:
[Superhuman]/Is Snoozed (Gmail ID: Label_3)list_emails(label_ids=['Label_3']) — do NOT use in:snoozedSuperhuman auto-categorizes emails with labels:
[Superhuman]/AI/Respond (Label_29), AI/Waiting (Label_23), AI/Meeting (Label_24)AI/News (Label_25), AI/Investors (Label_30), AI/AutoArchived (Label_32)Superhuman does NOT show drafts created via the Gmail API. Superhuman has its own draft system that doesn't sync inbound from Gmail.
Practical workflow:
create_threaded_draft() — appears in Gmail web (mail.google.com)threadId, In-Reply-To, References) for proper Gmail web threadingfrom gmail_operations import create_threaded_draft
create_threaded_draft(
original_message_id='<msg-id>',
to='[email protected]',
subject='Re: Subject',
body='Reply here'
)
For cleaning up large inboxes, use this pattern:
list_emails(query='in:inbox', max_results=200)thread_id to get unique conversationsarchive_email(msg_id) for each message with INBOX label[email protected] (these are unsnoozed emails)You: "Process my emails"
AI: Fetching unread emails from Gmail...
Found 23 unread emails from last 24 hours.
Analyzing with AI...
EMAIL TRIAGE RESULTS
🔴 URGENT (2 emails)
├─ Christian Engnath - "When can we start?" → DRAFT READY
└─ Fred - "Exec meeting agenda approval needed" → DRAFT READY
💬 RESPONSE NEEDED (5 emails)
├─ Sarah - "RPO pipeline update" → DRAFT READY
├─ Giuseppe - "Second interview availability" → DRAFT READY
└─ ... (3 more)
📥 ARCHIVE (12 emails)
├─ LinkedIn - "Job recommendations"
├─ GitHub - "Dependabot security alert"
└─ ... (10 more)
⏰ SNOOZE (4 emails)
├─ Investor - "Q1 metrics" → Snooze to Monday
└─ ... (3 more)
Actions:
1. Review urgent drafts first? (say "show urgent")
2. Execute all recommendations? (say "execute all")
3. Review each email? (say "review each")
You: "Show urgent"
AI: [Shows draft for Christian]
---
Hi Christian,
Great to hear you're ready to move forward!
Can you start Monday Feb 17? Fred will send you the onboarding details today.
Looking forward to working together.
Jonas
---
Approve this draft? (yes/edit/skip)
You: "Yes"
AI: ✅ Draft saved to Gmail drafts
[Shows next urgent draft...]
users.messages.list - Fetch unread emailsusers.messages.get - Get full email contentusers.drafts.create - Save response draftsusers.messages.modify - Archive emailsusers.threads.modify - Mark as read/snoozeTrack these to measure effectiveness:
Status: Ready to implement
Priority: High (Phase 2.1 of CEO Office Automation)
Dependencies: Gmail API access (via google-master), Notion API (via notion-master)