Email Newsletter Digest
by @neeravmakwana
Summarizes recent newsletter emails received in Gmail into a single newsletter digest. This skill identifies newsletter emails using configured labels or sen...
clawhub install email-newsletter-digestπ About This Skill
name: email-newsletter-digest description: Summarizes recent newsletter emails received in Gmail into a single newsletter digest. This skill identifies newsletter emails using configured labels or sender addresses. Use for requests like "send me the newsletter digest email", "email the newsletter digest to me and my friends", "schedule my newsletter digest every morning", or "update my newsletter digest recipients". version: 1.0.1 metadata: openclaw: always: false emoji: "π°" primaryEnv: OPENAI_API_KEY requires: bins: - python3 - gog - summarize env: - OPENAI_API_KEY
Email Newsletter Digest
Use this skill to send a digest of newsletter emails received within the last 1 day.
Read settings.json at the start of every invocation. For settings structure and maintainer notes, see REFERENCE.md.
When To Use
Use this skill when the user wants to:
Settings
Read settings.json at the start of every invocation.
The settings file contains:
newsletter_labels_csvnewsletter_senders_csvdigest_recipient_emails_csvrecipient_delivery_modeRules:
newsletter_labels_csv may be null or empty if newsletter_senders_csv is populatednewsletter_senders_csv may be null or empty if newsletter_labels_csv is populateddigest_recipient_emails_csv may contain one or more comma-separated email addressesrecipient_delivery_mode controls how emails are sent to multiple recipientsindividual to send one email per recipient
- group to send one email with all recipients in To
recipient_delivery_mode is omitted, default to groupAgent Workflow
1. Immediately send a short acknowledgement such as: "I'm preparing the email newsletter digest now."
2. Read settings.json.
3. Validate that at least one newsletter filter is populated and at least one recipient email is configured.
4. Run the bundled runner at ~/.openclaw/skills/email-newsletter-digest/scripts/newsletter-digest.py in a single blocking command with a generous timeout so you can wait for its stdout result. Do not background it and do not rely on follow-up polling for this skill.
5. Summarize each matching newsletter, build the digest, and send it using the configured recipient_delivery_mode.
6. When the run finishes, send a short completion message naming the recipients and the newsletter count.
If the user asks to update labels, senders, recipients, or recipient delivery mode:
settings.jsonIf the user asks to schedule it:
Core Rules
gog gmail messages search to fetch individual newsletter emails.gog gmail thread get --full first for body extraction.gog gmail get --json and extract the best MIME part.summarize to turn each newsletter into bullet points.summarize use its own configured/default model.Query Construction
Construct the Gmail search from the settings file:
label:Newsletters newer_than:1d
(from:a@example.com OR from:b@example.com) newer_than:1d
(label:Newsletters OR label:finance OR from:a@example.com OR from:b@example.com) newer_than:1dReporting Back
gog or summarize fails, surface the error instead of hiding it.β‘ When to Use
βοΈ Configuration
Read settings.json at the start of every invocation.
The settings file contains:
newsletter_labels_csvnewsletter_senders_csvdigest_recipient_emails_csvrecipient_delivery_modeRules:
newsletter_labels_csv may be null or empty if newsletter_senders_csv is populatednewsletter_senders_csv may be null or empty if newsletter_labels_csv is populateddigest_recipient_emails_csv may contain one or more comma-separated email addressesrecipient_delivery_mode controls how emails are sent to multiple recipientsindividual to send one email per recipient
- group to send one email with all recipients in To
recipient_delivery_mode is omitted, default to group