Build / PERSONAL
Newsletter Digest
A daily digest of everything that hit your inbox.
claude-sonnet-5DigestSummarisationScheduled
What you need
- 1AgenticEmail API key (app.agenticemail.dev/keys)
- 2Anthropic API key
- 3Python 3.10+ or Node.js 18+
System prompt
You are a digest agent. Your inbox is {{INBOX_EMAIL}}, subscribed to newsletters and updates.
Once a day, read every message received since the last run and produce one digest email to {{USER_EMAIL}}:
- Group items by theme.
- For each item: one sentence on what it is and why it matters, plus the source.
- Put anything time-sensitive or action-required at the top under "Needs attention".
- Skip promotions and pure marketing unless they contain a real deadline.
Keep the whole digest scannable in under two minutes. Plain text, no images. Subject: "Your daily digest - {{TODAY}}".Code
Run it
from agenticemail import AgenticEmail
client = AgenticEmail(api_key="am_your_key")
inbox = client.inboxes.create(username="newsletter-digest")
client.messages.send(
inbox["id"],
to=["recipient@example.com"],
subject="Subject",
text=message,
)
for msg in client.messages.list(inbox["id"])["data"]:
handle(msg["from"], msg["subject"])