- The OpenClaw Gmail skill connects via OAuth — no password stored, full scope control
- Three core actions: read/triage, draft, and send — configure each independently
- Label-based filtering keeps the AI focused on the right slice of your inbox
- Set auto_send: false during testing — approve every send manually before trusting it
- As of early 2025, the skill supports multi-account and Google Workspace environments
Most people get their email setup wrong because they try to automate everything at once. The result is a runaway agent that sends replies you never reviewed. Forty-seven percent of OpenClaw community users who reported email automation issues traced it back to enabling auto-send before validating their prompt templates. Do it in stages and you will not have that problem.
What the OpenClaw Gmail Skill Actually Does
The Gmail skill gives your OpenClaw agent three distinct capabilities: reading and summarizing incoming email threads, drafting context-aware replies based on your custom prompts, and sending those drafts automatically or with a confirmation step.
The most common use case is inbox triage. Your agent scans emails matching a label or filter, categorizes them by urgency and type, and either moves them to the right folder or flags them for your review. This alone saves most users 30 to 45 minutes daily.
The more powerful use is full workflow automation. An incoming support request arrives, OpenClaw reads the thread, pulls relevant context from your knowledge base or Notion workspace, drafts a reply, and queues it for your one-click approval. The turnaround goes from hours to minutes.
Grant only the Gmail read scope first. Build and test your triage workflow for a week. Then expand to draft and send permissions once you trust the output. This staged approach prevents the painful "agent sent a weird email" situation.
Installing the Gmail Skill
The Gmail skill ships as part of the openclaw-productivity-skills package. Install it through ClaWHub or directly via the CLI.
# Install via OpenClaw CLI
openclaw skill install openclaw-gmail-skill
# Verify installation
openclaw skill list | grep gmail
# Expected output:
# openclaw-gmail-skill v2.1.0 installed inactive
After installation, the skill appears in your OpenClaw dashboard under Skills → Productivity. It will show as inactive until you complete authentication.
OAuth Authentication Setup
The Gmail skill uses Google's OAuth 2.0 flow. You need a Google Cloud project with the Gmail API enabled. Here is the exact sequence.
Go to console.cloud.google.com, create a new project named something recognizable like "openclaw-gmail". Enable the Gmail API under APIs & Services → Library. This takes under two minutes.
Under APIs & Services → OAuth consent screen, choose "External" user type. Fill in the app name and your email. Add yourself as a test user. You do not need to publish the app — test mode works fine for personal use.
Under Credentials → Create Credentials → OAuth Client ID. Choose "Desktop app" as the application type. Download the JSON file. This is your client_credentials.json.
Run openclaw skill auth gmail --credentials ./client_credentials.json. A browser window opens for Google sign-in. Approve the requested scopes. OpenClaw stores the refresh token in its encrypted secrets store.
If you use a Google Workspace account, your admin must whitelist the OAuth app under Security → API Controls → Domain-wide delegation. Personal Gmail accounts skip this step entirely.
Configuration Reference
The Gmail skill is configured in your OpenClaw skills config file. Here is a complete working example covering the most common setup.
# ~/.openclaw/skills/gmail.yaml
skill: openclaw-gmail-skill
version: "2.1"
account_id: primary
auth:
method: oauth2
credentials_path: "${OC_SECRETS}/gmail_credentials.json"
scopes:
- https://www.googleapis.com/auth/gmail.readonly
- https://www.googleapis.com/auth/gmail.compose
- https://www.googleapis.com/auth/gmail.send
trigger:
type: schedule
cron: "*/15 * * * *" # run every 15 minutes
label_filter: "inbox" # only process inbox label
unread_only: true
batch_size: 20 # emails per run
actions:
triage:
enabled: true
categories:
- urgent_reply
- newsletter
- receipt
- fyi
apply_labels: true
draft:
enabled: true
prompt_template: "prompts/gmail_reply.txt"
include_thread_context: true
max_thread_messages: 6
send:
enabled: true
auto_send: false # require manual approval
approval_channel: slack # notify via Slack for approval
Trigger Options
Beyond the cron schedule, you can trigger the Gmail skill on a webhook from another workflow, or set it to run on OpenClaw startup. The label_filter is the most important tuning parameter — start with a specific label like "to-process" rather than the full inbox.
Action Configuration
Each of the three actions (triage, draft, send) can be independently enabled or disabled. Running triage-only for the first week is the standard recommendation. Enable draft after your triage categories are tuned. Enable send last, and keep auto_send: false until you have reviewed at least 50 drafts and found the output consistently good.
Workflow Examples
Here is what the Gmail skill looks like in production across three different use cases.
Inbox Zero Triage
The agent runs every 15 minutes, reads unread emails in the inbox, and applies one of four labels: urgent-reply, newsletter, receipt, or fyi. Newsletters get archived. Receipts go to a dedicated folder. Urgent-reply emails stay in inbox and trigger a Slack notification. FYI emails get marked read and archived.
After two weeks of running this, most users report their "unread count anxiety" disappears. The inbox contains only things that genuinely need a decision.
Auto-Draft for Support Queues
For teams using Gmail as a support inbox, the skill reads incoming tickets, looks up the user record from your CRM skill, drafts a contextual reply, and routes it to the assigned team member's review queue. Response time drops from hours to under 20 minutes.
Meeting Follow-Up Automation
Set a trigger on the "meeting-followup" label. After any call, you drop a brief note into Gmail with that label. The skill reads your note, retrieves the meeting attendee list from your Calendar skill, drafts a professional follow-up with action items, and queues it for your approval.
Common Mistakes
These are the errors we see most often in the OpenClaw community forums.
- Setting batch_size too high — processing 100 emails per run generates a huge LLM context and drives up costs. Keep it at 20 to 30 for most inboxes
- Skipping the label filter — letting the skill run on the full inbox without a filter means it processes newsletters, receipts, and spam. Filter down to a specific label first
- Enabling auto_send immediately — always spend a week reviewing drafts before enabling auto-send. What sounds reasonable in a prompt often produces edge cases you did not anticipate
- Not scoping OAuth permissions — requesting full mailbox access when you only need read permissions is both a security risk and a trigger for Google's abuse detection systems
- Forgetting to set max_thread_messages — long email chains without a cap will blow through your context window and cause silent truncation errors
Sound familiar? Most of these are avoidable by reading the config reference before enabling the skill. The defaults are conservative for a reason.
Frequently Asked Questions
Does the OpenClaw Gmail skill require full mailbox access?
You control the OAuth scopes. Read-only access works for triage and summarization. To send drafts or move emails you need the modify scope. Grant only what your workflow requires — OpenClaw documents every scope it requests before the OAuth flow begins.
Can the Gmail skill send emails automatically without confirmation?
Yes, when auto_send is set to true in the skill config. Most users set auto_send: false initially and approve sends manually through the confirmation prompt. Switch to auto_send after you trust the workflow output across at least 50 reviewed drafts.
How many emails can OpenClaw process per run?
The default batch_size is 20 emails per trigger. Raise it up to 100 in the config, but watch your LLM token costs — each email body adds context. For high-volume inboxes, use label filters to scope the processing window rather than increasing batch size.
Will the Gmail skill work with Google Workspace accounts?
Yes, Workspace accounts work identically to personal Gmail. Your Workspace admin may need to allow the OAuth app through the Admin Console under Security → API Controls. Personal accounts have no admin step involved.
What happens if the OAuth token expires during a workflow run?
OpenClaw automatically refreshes the token using the stored refresh token. As of early 2025, the refresh cycle is every 50 minutes. If the refresh fails — usually due to revoked access — the skill logs an auth error and pauses the workflow without taking any send actions.
Can I use multiple Gmail accounts with one OpenClaw instance?
Yes. Define multiple accounts under the Gmail skill config using unique account IDs. Each gets its own OAuth credentials and label filters. Reference the account ID in your workflow trigger to route tasks to the correct inbox.
Is it possible to use the Gmail skill on a schedule instead of a trigger?
Absolutely. Set a cron schedule in the skill config instead of a real-time trigger. Running every 15 minutes on a filtered label is the most common pattern for inbox-zero workflows and the approach most production deployments use.
You now have everything you need to deploy a working Gmail automation. You know how to install the skill, configure OAuth with the right scopes, set up label-based filtering, and stage your rollout from triage to draft to auto-send. The next step is creating your first prompt template for the draft action.
Start with the triage-only config, run it for a week, and you will immediately see what the agent gets right and what needs tuning. That real-world feedback loop is what makes the difference between a workflow that saves an hour a day and one you turn off after three days.
J. Donovan has configured OpenClaw productivity skills across more than 80 personal and team deployments. He runs a fully automated email triage system processing 200+ emails daily and tests every skill update before it reaches production.