mailclaw
Email-driven automation for Gmail. Use this skill whenever the user mentions email, inbox, mail, Gmail, or describes any automation involving email — such as creating rules, checking new messages, connecting apps like Slack/Notion/Calendar/Linear/HubSpot, or forwarding email content to other tools. Also use when the user wants to check connected app status, manage email rules, or when Heartbeat triggers automated email processing. Trigger even if the user doesn't say "email" explicitly but describes workflows like "when someone sends me a meeting invite, add it to my calendar" or "notify Slack when I get a support ticket". Also trigger when the user uses Chinese keywords related to email such as 邮件, 邮箱, 收件箱, 新邮件, 查邮件, 收邮件.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/3dwitch/mailclawMailClaw
An email-driven automation assistant. You help users turn their Gmail inbox into an automation hub — creating rules that react to incoming emails, analyzing new messages, and executing actions across connected apps.
Supported Apps
Gmail, Slack, Notion, Google Calendar, Linear, HubSpot
API
Base URL: http://150.5.152.134:9999
All endpoints require the X-User-Key header — except /daily-token/verify which uses a token parameter instead.
Read {baseDir}/references/actions.md for the exact tool names and parameter formats to use with /actions/execute — only use tool names listed in that file. Below is a quick reference for the most common operations.
Authentication
Every request (except daily-token verify and OAuth callback) needs:
X-User-Key: <user_api_key>
Key Endpoints
| Action | Method | Path | Notes |
|---|---|---|---|
| Check app auth | GET | /auth/status?app=gmail | Returns {connected: bool} |
| Check all apps | GET | /auth/status/all | Returns status for every supported app |
| Get OAuth link | GET | /auth/connect?app=slack | Returns {auth_url: "..."} |
| List all emails | GET | /emails?limit=20 | All emails — use for user queries |
| List unprocessed emails | GET | /emails?limit=20&unprocessed_only=true | Only unprocessed emails — use for Heartbeat |
| Mark email processed | POST | /emails/{id}/mark-processed | Store analysis and mark as processed. Body: {summary, intent, matched_rules, suggested_actions, actions_taken} |
| Email detail | GET | /gmail/messages/{id} | Full content of a single email |
| Send email | POST | /gmail/send | Body: {to, subject, body, reply_to_message_id?} |
| Execute action | POST | /actions/execute | Body: {app, action, params} |
| List rules | GET | /rules | All user rules |
| Create rule | POST | /rules | Body: {name, condition, app, action, action_template, enabled} |
| Update rule | PUT | /rules/{id} | Partial update |
| Delete rule | DELETE | /rules/{id} | |
| Generate daily token | POST | /daily-token/generate | Returns {token, link, date} |
| Verify daily token | GET | /daily-token/verify?token=xxx | No auth header needed |
How to Call the API
Use curl or equivalent HTTP tools. Example:
# List all emails (user query)
curl -s -H "X-User-Key: $API_KEY" "http://150.5.152.134:9999/emails?limit=10"
# List only unprocessed emails (Heartbeat)
curl -s -H "X-User-Key: $API_KEY" "http://150.5.152.134:9999/emails?limit=10&unprocessed_only=true"
# Mark an email as processed with analysis results
curl -s -X POST -H "X-User-Key: $API_KEY" -H "Content-Type: application/json" \
"http://150.5.152.134:9999/emails/{messageId}/mark-processed" \
-d '{"summary": "Q3 proposal revisions", "intent": "task", "matched_rules": [], "suggested_actions": [{"app": "notion", "action": "create_page", "label": "Create task"}], "actions_taken": []}'
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-3dwitch-mailclaw": {
"enabled": true,
"auto_update": true
}
}
}