$cd ../use-cases/
β‘ ProductivityMost Popular20 min setup
$ cat email-ai-assistant.md
await manageInbox(gmail, { autoTriage: true })
/** I let OpenClaw manage my inbox for 30 days. Here's exactly what happened. */
π 30-Day Experiment Results
94%
emails correctly categorized
2.1 hrs
saved per week
0
important emails missed
$0
running on local Ollama
how_it_works.md
βοΈ How It Works
1.
OpenClaw polls Gmail every 5 minutes
Using Gmail API with read-only scope. Your credentials never leave your server.
2.
LLM classifies each email
Categories: urgent / needs reply / newsletter / archive
3.
You get a Telegram digest
Morning/evening summary of what matters. Urgent emails ping you immediately.
4.
Reply via chat, OpenClaw sends the draft
Reply to the Telegram message with context, OpenClaw drafts the response for your approval.
setup.yaml
π¦ Setup (20 minutes)
// Step 1: Enable Gmail API in Google Cloud Console β Download credentials.json
$ cp ~/Downloads/credentials.json ~/.openclaw/gmail/
// Step 2: Add Gmail skill to config
skills:
gmail:
enabled: true
poll_interval: 300
notify_channel: "telegram"
// Step 3: Authorize and test
$ openclaw skill gmail auth
$ openclaw skill gmail test
# β Connected. 47 unread emails found.
example_digest.log
π¬ Example Morning Digest
π¦ OpenClaw β Morning Email Digest (08:00)
π΄ Urgent (2)
β’ Invoice #1042 overdue β from Acme Corp
β’ Server alert from DigitalOcean β disk at 94%
π¬ Needs Reply (4)
β’ Interview request from Recruiter at Stripe
β’ Meeting reschedule β John (tomorrow 2pm β 4pm?)
π° Newsletters archived: 12 | Automated: 8
β FAQ
Q1. Does OpenClaw read all my emails?
Only with read-only Gmail API scope. It classifies and summarizes emails but never modifies, deletes, or forwards them without explicit approval.
Q2. Can it compose replies for me?
Yes. Reply to the Telegram digest with context, and OpenClaw drafts a response. You review and approve before it's sent via Gmail API.
Q3. What about work emails with sensitive data?
Everything runs on your hardware. With local LLMs via Ollama, email content never leaves your machine. Even with API models, only the email text is sent β not attachments.
Q4. Does it support Outlook/Yahoo?
Currently Gmail API only. Outlook support via Microsoft Graph API is on the roadmap. You can also use IMAP for generic email providers.
Q5. How accurate is email classification?
94% accuracy in our 30-day test. The LLM understands context β it knows 'server alert from DigitalOcean' is urgent but 'weekly newsletter from Medium' is archive-worthy.