📧

Advanced

Email Access

Add email automation to send reports, receive alerts, and process incoming messages. Perfect for workflows that need external communication.

What You Can Do

📤

Send Reports

Automated daily summaries

📥

Process Inbox

Read and categorize emails

🔔

Smart Alerts

Conditional notifications

Setup Options

Option 1: AgentMail

Dedicated email service for AI agents. Clean API, designed for automation.

  • • Built for AI workflows
  • • Simple API integration
  • • Good for transactional emails

Option 2: Gmail API

Connect to your existing Gmail account:

  1. Enable Gmail API in Google Cloud Console
  2. Create OAuth credentials
  3. Store tokens securely in OpenClaw config

Option 3: SMTP

Use any email provider with SMTP:

openclaw config set tools.email.smtp.host 'smtp.gmail.com'
openclaw config set tools.email.smtp.port 587
openclaw config set tools.email.smtp.user 'your@email.com'
openclaw config set tools.email.smtp.pass 'your-app-password'

Example Workflows

Morning Brief via Email:

Send me a daily email at 8am with today's weather, tasks, and news

Website Down Alert:

If my website is down, send me an urgent email immediately

Inbox Summary:

Read my unread emails and summarize the important ones

AgentMail Realtime Troubleshooting (WebSocket)

If emails appear in AgentMail inbox but OpenClaw does not react in realtime, use this checklist.

  1. Confirm inbox receives mail via AgentMail API (delivery works).
  2. Align websocket flow: connect()waitForOpen()sendSubscribe().
  3. Handle both event shapes: message.received and message_received.
  4. Upgrade AgentMail SDK in plugin to latest stable version.
  5. Restart gateway and run a self-send websocket test.

Safe commands (no real keys):

# In plugin directory
npm install agentmail@latest

# Restart OpenClaw gateway
openclaw gateway restart

# Check live logs
openclaw logs --follow

🔐 Never paste real secrets in docs

Use placeholders like YOUR_AGENTMAIL_TOKEN and store real values in config/env only.

Security Notes

⚠️ Important

  • • Use app passwords, not your main password
  • • Store credentials in OpenClaw config (encrypted)
  • • Enable 2FA on your email account
  • • Review email permissions regularly