Free playbooks in your inbox

How to Have OpenClaw Handle Your Email Before You Wake Up

Wake up to an inbox that's already sorted, with replies drafted in your voice and waiting for a thumbs-up from your phone. It takes one skill file, a mail tool OpenClaw already ships and two scheduled jobs, plus one Google setting that quietly switches the whole thing off after seven days if you miss it.

From the youcanbuildthings catalog ▸ Build-tested

Hello builders,

By 7:22 on a weekday your inbox can be done: OpenClaw sorted what came in overnight, drafted the replies that need one, and you approved them from your phone over coffee. The setup is shorter than most guides make it, and there’s one Google setting that switches the whole thing off a week later if you miss it. This OpenClaw email automation agent is one skill file, a mail tool OpenClaw already ships, and two scheduled jobs.

OpenClaw email automation agent: Every Email Takes One of Four Routes. 31 overnight emails sorted at 7:14 into Urgent 3 (flagged straight to Telegram), Respond 5 (drafted in your voice, waiting for approval), Auto-Archive 22 (newsletters, order confirmations, notifications) and Flagged 1 (a deadline it noticed). The skill's four steps: Read, Classify, Draft, Report. Nothing sends without you; the approved reply went at 7:22.

Here’s what that morning looks like. At 7:14 the briefing lands in Telegram: 31 emails came in overnight, 3 are urgent and flagged, 5 have drafts waiting, 22 were archived (newsletters, order confirmations, notifications), and 1 is a deadline it noticed that you hadn’t. All night the skill does four things, read, classify, draft and report, and it never sends. We approve the drafts, and the reply goes out at 7:22 because we said so.

Connect the mail you have

Most tutorials open a Google Cloud walkthrough before anything else. OpenClaw already ships two mail skills: gog for Gmail and Calendar, and himalaya for any IMAP account, so Fastmail, Proton through Bridge or a work server. We turn one on and ask what it needs.

openclaw config set skills.entries.gog.enabled true
openclaw skills info gog --agent main

On a fresh 2026.9.6 install that prints gog △ Needs setup, Visible to model: no and Binaries: ✗ gog, which looks broken and isn’t: the skill is waiting on its command-line tool. There’s still a little console work for Gmail, though far less than the walkthroughs. Per gog’s quickstart, gog “talks to Google APIs as you, using your own Cloud project”, so you still create one Desktop OAuth client once. The quickstart’s guided command, gog auth setup you@gmail.com --gcloud-project my-gog-project --enable-apis --open-console, turns on the APIs and opens the Google Cloud console. There we set the consent screen to External with our own email, create a Desktop app OAuth client, and download its JSON file, which is the client_secret_*.json the next block reads.

brew install openclaw/tap/gogcli
gog auth credentials ~/Downloads/client_secret_*.json
gog auth add you@gmail.com --services gmail,calendar
gog auth list --check

Then the setting that bites. The same page says apps left in Testing “issue refresh tokens for user-data scopes that expire after seven days.” An agent that reads your mail at 3am will simply stop on day 8, and would you notice before the briefings went quiet? We fix it once: in the Cloud project, open Audience, click Publish app, then Confirm. If your mail isn’t on Google, himalaya with an app password skips all of this.

One skill, two schedules

Save this as ~/.openclaw/workspace/skills/email-triage/SKILL.md. It’s the four steps from the picture, in plain English.

---
name: email-triage
description: Triage the user's inbox, classify each unread message, and draft replies for the ones that need one.
---

# Email Triage

Use when asked to triage the inbox, or when run on a schedule.

1. Read unread messages in the inbox, up to 20 at a time.
2. Classify each one as URGENT, RESPOND, ARCHIVE or SPAM, applying the rules in ~/.openclaw/workspace/email-rules.md over your own judgement.
3. For URGENT and RESPOND only, draft a reply in the voice described in ~/.openclaw/workspace/writing-style.md. Check my calendar before proposing times. Save each reply as a draft. Never send.
4. Send me a Telegram message: counts per category, one line per URGENT item, and the drafts waiting for approval.

We schedule it with its own command, outside the skill file.

openclaw skills info email-triage --agent main     # want: Visible to model: yes
openclaw cron add "email-triage" --every 15m --message "Triage my inbox" --announce
openclaw cron add "morning-briefing" --cron "0 7 * * *" --message "Send my morning briefing" --announce
openclaw cron list
openclaw cron run <id>                             # test it now, not in 15 minutes

I ran both cron add lines against a test gateway on 2026.9.6 and both jobs showed up in cron list. With no chat connected, delivery warned that a channel is required, which is the tell that --announce goes to your last chat; --channel telegram pins it.

Do the multiplication before you pick the interval. Ninety-six runs a day at 8,000 tokens is about 23 million input tokens a month: $3.69 on a cheap cached model, $46.08 on a frontier one without caching. I run it on the cheap primary, and I’d honestly try every 30 minutes first, since that’s half the bill and nobody notices the difference in an inbox.

The skill reads two files you write yourself, and both live in ~/.openclaw/workspace/ so the agent can reach them after hardening. Create them before the first run. email-rules.md holds your judgement, and mine starts with four headings: Always Urgent (my two biggest senders, and subjects with deadline, payment or invoice), Always Archive (order confirmations, GitHub notifications, calendar updates), Never Auto-Send (anything to a client worth more than $5,000 a year, anything with financial details, a first email to a new contact) and Manual Only (the lawyer, the doctor, anything with NDA in the subject). Mail that matches Manual Only never reaches a model at all, and the briefing just tells you it skipped it. writing-style.md holds your voice: short paragraphs of two or three sentences, how you open (“Hey [name]”, never “Dear”), how you sign off (“Best,” for clients, nothing for teammates), no exclamation marks in professional mail, and action items confirmed as “I’ll have X to you by Y.” How do you know what to write in it? Pull up ten or twenty of your own sent emails and write down what you actually do.

For the first two weeks, read the archive folder daily, because the expensive mistake here is a real prospect filed as marketing. When it gets one wrong, we fix the rules file and leave the agent alone, since a line in that file is what it reads again every 15 minutes.

Now go build something this weekend!

John Cook

Why trust this? Every youcanbuildthings guide is pulled from a build-tested book: code that ran in production before it was written down.