You open your inbox to 47 unread emails. Thirty minutes later, you've processed them all and done zero actual work. A daily digest reads your inbox overnight and gives you a 2-minute summary — grouped by priority, with draft replies ready to send.
Before building anything, here's the end result — the summary you'll see every morning:
🔴 Needs Reply Today (3)
• Sarah Chen — Proposal feedback. She approved the $4,200 scope but wants the timeline shortened from 4 weeks to 3. Needs your call by end of day.
• Stripe — Payout failed. Your bank rejected the $1,847 deposit. They need updated banking details by Friday or it reverts.
• Jake (team) — Blocked on the API integration. Needs your decision: use the v2 endpoint (stable, slower) or v3 (beta, 4x faster). His recommendation: v3.
🟡 FYI — Read When You Have Time (5)
• Product Hunt featured a competitor (Lindy AI) — 847 upvotes. Summary: they launched a new "agent templates" feature.
• GitHub: 3 PRs merged overnight by Dependabot (dependency updates, no action needed).
• Newsletter open rate from yesterday's send: 34.2% (up from 28.1% last week).
• 2 new Discord members in #general, no questions pending.
🗑️ Skipped (39)
• 22 marketing emails, 8 automated notifications, 6 newsletters (none matched your priority senders), 3 spam.
Total reading time: 90 seconds. Without the digest, those 47 emails would have taken 25-40 minutes to scan, prioritize, and decide what needs attention.
The AI needs to know what matters to you. Copy this template and fill in the blanks:
## Email Digest Rules
PRIORITY SENDERS (always "Needs Reply"):
- [Your boss / key client / investor — list by name or domain]
- [Team members — @yourcompany.com]
- [Anyone I've emailed in the last 7 days]
PRIORITY KEYWORDS (bump to "Needs Reply" if found):
- "urgent", "ASAP", "by end of day", "deadline"
- "payment failed", "payout", "invoice overdue"
- "blocked", "need your decision", "waiting on you"
ALWAYS SKIP:
- Marketing emails (unsubscribe footers)
- Automated notifications from GitHub, Jira, Linear (unless they mention my name)
- Newsletters (unless from: [list your must-read newsletters])
- Anything from noreply@ addresses
DIGEST FORMAT:
- 🔴 Needs Reply Today — 1-2 sentence summary each, what they're asking for
- 🟡 FYI — one line each, only if genuinely useful
- 🗑️ Skipped — count by category, no details
The key insight: "Always skip" is more important than "priority senders." Most inboxes are 70-80% noise. Cutting the noise is where the time savings actually come from.
You have three options depending on your comfort level:
The simplest path if you use Gmail. Google Apps Script runs inside your Google account — no server needed, no API keys to manage.
function dailyDigest() {
// Fetch unread emails from the last 24 hours
var threads = GmailApp.search('is:unread newer_than:1d', 0, 50);
var emails = [];
threads.forEach(function(thread) {
var msg = thread.getMessages()[thread.getMessageCount() - 1];
emails.push({
from: msg.getFrom(),
subject: msg.getSubject(),
snippet: msg.getPlainBody().substring(0, 500),
date: msg.getDate()
});
});
if (emails.length === 0) {
return; // No unread mail — no digest
}
// Build the prompt
var emailList = emails.map(function(e, i) {
return (i+1) + '. FROM: ' + e.from +
'\n SUBJECT: ' + e.subject +
'\n PREVIEW: ' + e.snippet + '\n';
}).join('\n');
var prompt = 'You are an email digest assistant. ' +
'Classify each email below and produce a summary.\n\n' +
'RULES:\n' +
'[Paste your rules from Step 1 here]\n\n' +
'EMAILS:\n' + emailList + '\n\n' +
'OUTPUT FORMAT:\n' +
'🔴 Needs Reply Today\n• [sender] — [1-2 sentence summary]\n\n' +
'🟡 FYI\n• [one line each]\n\n' +
'🗑️ Skipped ([count] emails)\n• [count by category]';
// Call your AI (example: Anthropic API)
var response = UrlFetchApp.fetch('https://api.anthropic.com/v1/messages', {
method: 'post',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY', // Store in Script Properties for security
'anthropic-version': '2023-06-01'
},
payload: JSON.stringify({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
messages: [{ role: 'user', content: prompt }]
})
});
var result = JSON.parse(response.getContentText());
var digest = result.content[0].text;
// Deliver: send as email to yourself (or use a webhook for Slack/Discord)
GmailApp.sendEmail('[email protected]', '📬 Daily Digest — ' +
new Date().toLocaleDateString(), digest);
}
Works with Outlook, Yahoo, Fastmail, or any provider that supports IMAP. Run on your computer, a VPS, or a Raspberry Pi via cron.
import imaplib, email, anthropic, json
from datetime import datetime, timedelta
# Connect (works with any IMAP provider)
mail = imaplib.IMAP4_SSL("imap.gmail.com") # or imap.outlook.com, etc.
mail.login("[email protected]", "your-app-password")
mail.select("inbox")
# Fetch unread from last 24h
since = (datetime.now() - timedelta(days=1)).strftime("%d-%b-%Y")
_, msg_ids = mail.search(None, f'(UNSEEN SINCE {since})')
emails = []
for mid in msg_ids[0].split()[:50]: # Cap at 50 to control cost
_, data = mail.fetch(mid, "(RFC822)")
msg = email.message_from_bytes(data[0][1])
body = ""
if msg.is_multipart():
for part in msg.walk():
if part.get_content_type() == "text/plain":
body = part.get_payload(decode=True).decode(errors="ignore")[:500]
break
else:
body = msg.get_payload(decode=True).decode(errors="ignore")[:500]
emails.append(f"FROM: {msg['from']}\nSUBJECT: {msg['subject']}\nPREVIEW: {body}\n")
if not emails:
exit()
prompt = f"""Classify these emails and produce a daily digest.
[Paste your rules from Step 1 here]
EMAILS:
{"".join(emails)}
Output the digest in this format:
🔴 Needs Reply Today
🟡 FYI
🗑️ Skipped (count by category)"""
client = anthropic.Anthropic()
resp = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": prompt}]
)
print(resp.content[0].text)
# Save to file, send via webhook, or pipe to your preferred channel
Cron entry to run daily at 6:30 AM:
30 6 * * * cd ~/email-digest && python3 digest.py >> digest.log 2>&1
If you don't want to touch code at all:
Your first digest will be imperfect. That's expected. After day 1, make these adjustments:
@substack.com, @beehiiv.com, @buttondown.email.Most digests stabilize after 3-4 days of tuning. You're training the rules, not the AI — the AI follows whatever rules you give it.
50 emails/day, Claude Sonnet:
Input: ~25,000 tokens (50 emails × 500 char snippets + prompt) = $0.075
Output: ~500 tokens (the digest summary) = $0.0075
Daily cost: ~$0.08
Monthly cost: ~$2.50
That's less than one specialty coffee. For 25-40 minutes saved every morning, the ROI is roughly 12-16 hours of inbox time saved per month for $2.50.
The AI reads email snippets — it never has credentials to send, delete, or modify your inbox.
gmail.readonly) for Apps Script or OAuth. The script literally cannot send email on your behalf if you restrict the scope.mail.search and mail.fetch — never mail.store or mail.delete.Replaces: The 25-40 minute morning scan through your inbox. The mental load of deciding "is this important?" 47 times. The anxiety of wondering if you missed something urgent overnight.
Doesn't replace: Actually replying to emails. The digest tells you what needs a reply — you still write the reply. (Though you could add draft replies as a next step — that's a separate guide in the Library.)
Email digests, customer support automation, content workflows, and more. Every guide tested on a real business. $9/month, cancel anytime.
Get The Library — $9/mo30-day money-back guarantee