# Email Automation: Let Your Agent Handle Your Inbox

Canonical: https://clawdocx.com/docs/email-automation
Author: Sam Okafor
Difficulty: INTERMEDIATE
Published: 2026-02-24
Updated: 2026-09-19

> Learn how to automate email management with OpenClaw using AgentMail, Gmail integration, smart triage, auto-reply rules, and email-to-task workflows.

## The Email Automation Revolution

Email is the most universal communication protocol on the internet. It is also one of the biggest time sinks in modern work. The average knowledge worker spends 2.5 hours per day on email, much of it on repetitive tasks: sorting, triaging, writing acknowledgments, forwarding to the right person, and extracting action items.

AI-powered email automation changes this fundamentally. Instead of you checking email, your agent checks email. Instead of you writing "Thanks, I'll look into this," your agent writes it. Instead of you extracting a meeting time from an email and adding it to your calendar, your agent does it automatically.

The spectrum of email automation ranges from simple to fully autonomous:

| Level | Description | Human Involvement |
|-------|-------------|-------------------|
| **Notification** | Agent alerts you about important emails | You read and respond manually |
| **Triage** | Agent sorts, labels, and prioritizes | You review pre-sorted inbox |
| **Draft** | Agent drafts responses for review | You approve or edit drafts |
| **Semi-autonomous** | Agent sends routine replies, drafts complex ones | You handle escalations |
| **Fully autonomous** | Agent handles all email independently | You review weekly summaries |

> **Note**
>
> Most users start at the Triage level and gradually increase autonomy as they build trust in their agent's judgment. There is no need to go fully autonomous on day one. Start small, verify the agent's decisions, and expand over time.

---

## AgentMail: The Breakthrough

AgentMail is a purpose-built email service that gives your OpenClaw agent its own email address. This is not your Gmail with AI filters. This is a dedicated email identity that your agent owns and operates independently.

### What AgentMail Is

AgentMail provides:
- A real email address for your agent (e.g., `assistant@agentmail.dev`)
- Full send and receive capability
- IMAP and SMTP access for the agent
- Webhook notifications for incoming mail
- Structured email parsing (headers, body, attachments)
- Thread tracking for multi-message conversations

### Setting Up AgentMail

```bash
openclaw skills install @<publisher>/agentmail
```

There is no configure step to run afterwards. The settings go in `~/.openclaw/openclaw.json` under `skills.entries.agentmail`, which is where the skills config reference puts them: "Most skills configuration lives under `skills` in `~/.openclaw/openclaw.json`." On that entry, `config` is an "Optional bag for custom per-skill configuration fields", so the field names inside the bag belong to the skill.

`agentmail` and `gmail-bridge` are illustrative skill keys, as are the fields in their `config` bags and the publisher scope in front of each slug; take the real ones from the skill's ClawHub listing before you copy any command or block below.

```json5
// ~/.openclaw/openclaw.json
{
  skills: {
    entries: {
      agentmail: {
        enabled: true,
        config: {
          address: "myagent@agentmail.dev", // your agent's email
          display_name: "Alex's Assistant",
          signature: "--\nSent by Alex's AI Assistant\nPowered by OpenClaw",
          check_interval: 300, // check every 5 minutes
          notify_channel: "telegram", // notify on new mail
        },
      },
    },
  },
}
```

### Your Agent Can Send Email

Once configured, your agent can compose and send emails:

```
You: "Send an email to john@example.com thanking him for the meeting
     today and confirming the follow-up for next Tuesday at 2 PM"
```

The agent sends from `myagent@agentmail.dev` with proper formatting, your configured signature, and a professional tone.

### Your Agent Can Receive and Respond

When someone replies to your agent's email, the agent receives it and can:
- Notify you about the response
- Draft a reply for your review
- Respond automatically based on configured rules
- File the conversation in appropriate categories

### Use Cases for AgentMail

| Use Case | Agent Email | Purpose |
|----------|-------------|---------|
| **Support inbox** | support@agentmail.dev | Handle customer inquiries, FAQ routing |
| **Notifications** | alerts@agentmail.dev | Receive system alerts, process and summarize |
| **Newsletter digests** | news@agentmail.dev | Subscribe to newsletters, get daily summaries |
| **Form submissions** | forms@agentmail.dev | Receive form submissions, process into spreadsheet |
| **Vendor communication** | purchasing@agentmail.dev | Handle routine vendor emails and quotes |

> **Tip**
>
> AgentMail addresses are real email addresses that can receive mail from anyone. Subscribe your agent to newsletters, use it as a contact form destination, or give it to vendors for routine correspondence. The agent processes everything it receives.

---

## Gmail and Google Workspace Integration

Most people's primary email is Gmail. The Gmail integration skill connects your agent to your existing inbox without requiring you to switch to AgentMail.

### Connecting Your Gmail Account

```bash
openclaw skills install @<publisher>/gmail-bridge
```

The setup process requires OAuth2 authentication:

### Step 1: Run the install command above

### Step 2: A browser window opens to Google's OAuth consent screen

### Step 3: Sign in with your Google account

### Step 4: Review the permissions (read, send, modify labels)

### Step 5: Click Allow to grant access

### Step 6: The OAuth token is stored securely in your OpenClaw keychain

### Step 7: Confirm the skill is ready: openclaw skills check

### Reading and Summarizing Emails

Ask your agent to check your inbox:

```
You: "Check my Gmail and give me a summary of unread emails"
```

Sample output:

```
Gmail Summary - Feb 24, 2026
28 unread emails

URGENT (2):
  1. From: boss@company.com - "Q1 Budget Review - Need by EOD"
     Received: 9:15 AM - Needs your attention today
  2. From: client@bigcorp.com - "Contract revision attached"
     Received: 8:45 AM - Contains attachment requiring review

IMPORTANT (5):
  3. From: team@company.com - "Sprint retrospective notes"
  4. From: hr@company.com - "Updated PTO policy"
  5. From: partner@vendor.com - "Invoice #4521"
  6. From: recruiter@linkedin.com - "New candidate for review"
  7. From: support@saas-tool.com - "Your feature request update"

INFORMATIONAL (12):
  8-19. Various newsletters, notifications, and updates

LOW PRIORITY (9):
  20-28. Marketing emails, promotions, social media notifications
```

### Smart Categorization

The agent categorizes emails using multiple signals:

| Signal | Weight | Description |
|--------|--------|-------------|
| **Sender** | High | Known contacts, VIPs, work vs personal |
| **Subject keywords** | Medium | "urgent," "action required," "FYI," "invoice" |
| **Time sensitivity** | Medium | Deadlines, meeting times, expiring offers |
| **Thread history** | Low | Ongoing conversations vs new threads |
| **Content analysis** | Low | The actual email body parsed for urgency |

Configure your categorization preferences:

```json5
// ~/.openclaw/openclaw.json
{
  skills: {
    entries: {
      "gmail-bridge": {
        config: {
          categorization: {
            urgent: {
              senders: ["boss@company.com", "ceo@company.com"],
              keywords: ["urgent", "ASAP", "emergency", "deadline today"],
            },
            important: {
              senders: ["*@company.com", "*@bigclient.com"],
              keywords: ["action required", "please review", "invoice", "contract"],
            },
            low_priority: {
              senders: ["*@marketing.com", "noreply@*"],
              keywords: ["unsubscribe", "promotion", "newsletter"],
            },
          },
        },
      },
    },
  },
}
```

### Drafting Responses

Your agent can draft replies for your review:

```
You: "Draft responses to the urgent emails. I'll review before sending."
```

The agent drafts contextually appropriate responses:

```
Draft for: boss@company.com - "Q1 Budget Review - Need by EOD"
---
Hi Sarah,

Thank you for the reminder. I'm working on the Q1 budget review
and will have it on your desk by 4 PM today.

I have a couple of questions about the marketing allocation that
I'll flag in the document for your review.

Best,
Alex
---
[APPROVE] [EDIT] [REJECT]
```

> **Tip**
>
> Start with draft-and-approve mode. Once you have reviewed 50-100 drafts and the agent consistently matches your tone and judgment, consider upgrading to semi-autonomous mode where it sends routine responses automatically.

---

## Auto-Reply Rules

Configure automatic responses for common scenarios without manual approval.

### Rule-Based Auto-Replies

Simple pattern matching for predictable situations:

```yaml
# ~/.openclaw/skills/gmail-bridge/auto-reply.yaml
rules:
  - name: "Out of office"
    enabled: false                         # Toggle for vacations
    match:
      all_incoming: true
    reply: |
      Thank you for your email. I'm currently out of the office
      and will return on March 3rd. For urgent matters, please
      contact backup@company.com.

  - name: "Meeting request acknowledgment"
    match:
      subject_contains: ["meeting", "calendar invite", "schedule"]
      from_domain: ["company.com"]
    reply: |
      Thanks for the meeting request! I'll review my calendar
      and confirm shortly.
    max_per_sender: 1                      # Only once per sender per day

  - name: "Vendor invoice received"
    match:
      subject_contains: ["invoice", "payment", "bill"]
      has_attachment: true
    actions:
      - reply: "Invoice received. I'll process this within 48 hours."
      - label: "Finance/Invoices"
      - forward: "accounting@company.com"
```

### AI-Powered Smart Replies

For more nuanced situations, let the agent craft context-aware responses:

```yaml
# Smart reply configuration
smart_replies:
  enabled: true
  mode: "draft"                            # "draft" (review first) or "auto" (send immediately)
  scenarios:
    - name: "Customer support inquiries"
      match:
        to: "support@agentmail.dev"
      behavior: |
        Respond helpfully to customer inquiries. Check the FAQ
        at ~/Documents/faq.md for common questions. If the question
        is not in the FAQ, escalate to me on Telegram.
      tone: "professional, friendly, helpful"
      max_length: 200

    - name: "Scheduling requests"
      match:
        subject_contains: ["schedule", "meet", "call", "coffee"]
      behavior: |
        Check my calendar for availability. Suggest 2-3 open time
        slots in the next week. Use my timezone (PST).
      requires: ["calendar-sync"]          # Depends on calendar skill

    - name: "Recruiter outreach"
      match:
        subject_contains: ["opportunity", "role", "position", "hiring"]
        from_domain_not: ["company.com"]
      behavior: |
        Politely decline. I'm not looking for new opportunities.
        Keep the response brief and professional.
      mode: "auto"                         # Send without review
```

### Approval Workflows

For important emails, configure an approval step:

```yaml
# Approval workflow
approval:
  channel: "telegram"                      # Where to send for approval
  timeout: 3600                            # 1 hour timeout
  on_timeout: "hold"                       # "hold" (do nothing) or "send" (send anyway)

  # Show draft with approve/reject buttons
  format: |
    New Email Draft for Review

    To: {to}
    Subject: {subject}

    {draft_body}

    Reply with:
    /approve - Send as written
    /edit [changes] - Modify and send
    /reject - Discard draft
```

---

## The Insurance Negotiation Story

One of the most compelling demonstrations of email automation's potential is the story of an OpenClaw user whose agent successfully negotiated an insurance claim, entirely via email, over several weeks.

### The Situation

The user's home had water damage from a burst pipe. The insurance company's initial estimate was $8,400, significantly below the actual repair cost of $14,200. The user asked their OpenClaw agent to handle the claim negotiation.

### What the Agent Did

### Step 1: Researched the insurance policy terms, focusing on water damage coverage provisions

### Step 2: Analyzed the insurance company's initial estimate and identified specific underpayments

### Step 3: Drafted a detailed counter-response with line-item comparisons between the estimate and actual repair quotes

### Step 4: Cited specific policy clauses that supported full coverage

### Step 5: Sent the initial response via AgentMail to the claims adjuster

### Step 6: Received the adjuster's counter-offer of $10,100 and analyzed the new gaps

### Step 7: Drafted a second response with additional contractor quotes and photographic evidence references

### Step 8: Managed three more rounds of back-and-forth over two weeks

### Step 9: The insurance company agreed to $13,800, or 98% of the actual repair cost

### Step 10: The user reviewed the final agreement and confirmed acceptance

### Key Takeaways

- The agent maintained a consistent, professional, and factual tone throughout
- It referenced specific policy clause numbers, something most humans would not bother to look up
- It was patient and persistent through multiple rounds of negotiation
- The user spent approximately 20 minutes total (initial setup and final review) on a process that would have taken hours of research and writing

> **Note**
>
> This is not a hypothetical scenario. Real OpenClaw users are delegating complex email negotiations to their agents. The key is providing the agent with reference documents (insurance policies, contracts, receipts) and clear goals. The agent handles the tedious back-and-forth.

### Setting Up a Similar Workflow

```
You: "I need to dispute my insurance claim. The claim number is CLM-2026-4521.
     The initial estimate is $8,400 but actual repairs will cost $14,200.
     Here's my policy: ~/Documents/insurance-policy.pdf
     Here are the repair quotes: ~/Documents/repair-quotes/
     Handle the negotiation via email with claims@insurance-co.com.
     Keep me updated on Telegram and get my approval before accepting any offer."
```

The agent will:
1. Read and analyze the insurance policy
2. Review all repair quotes
3. Draft an initial dispute email
4. Send it to you for approval on Telegram
5. Once approved, send via AgentMail
6. Monitor for responses and continue the negotiation
7. Alert you with each new development and proposed response

---

## Smart Email Triage Workflow

Build a complete email management system that runs automatically throughout the day.

### Priority Scoring

The agent assigns a priority score (1-100) to each email based on configurable criteria:

```yaml
# ~/.openclaw/skills/gmail-bridge/triage.yaml
scoring:
  sender_rules:
    - match: "boss@company.com"
      score: 95
    - match: "*@company.com"
      score: 70
    - match: "*@bigclient.com"
      score: 80
    - match: "noreply@*"
      score: 10

  keyword_rules:
    - match: ["urgent", "ASAP", "emergency"]
      score_boost: 30
    - match: ["FYI", "no action needed"]
      score_boost: -20
    - match: ["invoice", "payment", "deadline"]
      score_boost: 15

  time_rules:
    - contains_today_date: true
      score_boost: 20
    - contains_this_week_date: true
      score_boost: 10

  thresholds:
    urgent: 85                             # Score >= 85 = urgent
    important: 60                          # Score >= 60 = important
    normal: 30                             # Score >= 30 = normal
    low: 0                                 # Score < 30 = low priority
```

### Automatic Labeling and Organization

```yaml
# Auto-labeling rules
labels:
  - name: "Finance"
    match:
      subject_contains: ["invoice", "payment", "expense", "budget", "receipt"]
      from_domain: ["paypal.com", "stripe.com", "quickbooks.com"]

  - name: "Meetings"
    match:
      subject_contains: ["meeting", "calendar", "invite", "schedule", "call"]
      has_ics_attachment: true

  - name: "Projects/ProjectAlpha"
    match:
      subject_contains: ["Project Alpha", "alpha-", "#alpha"]
      from: ["*@alpha-team.com", "pm@company.com"]

  - name: "Newsletters"
    match:
      headers:
        list-unsubscribe: "*"
    auto_archive: true                     # Skip inbox, apply label only
```

### Daily Digest

Configure a daily email summary delivered to your preferred channel:

```yaml
# Daily digest configuration
digest:
  schedule: "0 8 * * 1-5"                 # Weekdays at 8 AM
  channel: "telegram"
  include:
    - unread_count
    - urgent_emails_detail
    - important_emails_summary
    - action_items_extracted
    - meetings_today
  format: "detailed"                       # "brief" or "detailed"
```

```bash
openclaw cron add --schedule "0 8 * * 1-5" --task "Generate daily email digest: summarize all unread emails by priority, extract action items, list meetings from calendar invites. Send to Telegram."
```

### VIP Sender List

For critical contacts, get immediate notifications regardless of schedule:

```yaml
# VIP sender configuration
vip_senders:
  - email: "ceo@company.com"
    name: "Sarah (CEO)"
    notify: "immediate"
    channel: "telegram"
    priority: "always_urgent"

  - email: "wife@gmail.com"
    name: "Lisa"
    notify: "immediate"
    channel: "telegram"
    priority: "always_important"

  - email: "*@bigclient.com"
    name: "BigCorp Team"
    notify: "within_15min"
    channel: "slack"
    priority: "important"
```

---

## Email-to-Task Workflows

The real power of email automation comes from connecting email to your other tools.

### Email to Linear Issue

Automatically create Linear issues from specific emails:

```yaml
# Email-to-Linear configuration
integrations:
  linear:
    trigger:
      from: "*@company.com"
      subject_contains: ["bug report", "feature request", "issue"]
    action:
      create_issue:
        team: "Engineering"
        title: "{subject}"
        description: |
          Reported by: {from}
          Date: {date}

          {body}
        labels:
          - "from-email"
        priority: "auto"                   # Agent determines priority from content
    notify:
      channel: "slack"
      message: "New Linear issue created from email: {subject}"
```

```
You: "When I receive emails with 'bug report' in the subject from @company.com,
     automatically create a Linear issue with the email content and notify me on Slack"
```

### Email to Notion Database

Log emails into a Notion database for tracking:

```yaml
integrations:
  notion:
    trigger:
      label: "Finance"
    action:
      add_to_database:
        database: "Invoice Tracker"
        properties:
          Name: "{subject}"
          Sender: "{from}"
          Date: "{date}"
          Amount: "auto-extract"           # Agent extracts dollar amount from body
          Status: "Pending"
          Attachment: "{attachment_url}"
```

### Email to Calendar Event

Automatically create calendar events from meeting-related emails:

```yaml
integrations:
  calendar:
    trigger:
      subject_contains: ["meeting", "call", "sync", "let's meet"]
      has_time_reference: true
    action:
      create_event:
        title: "auto-extract"
        time: "auto-extract"
        duration: "30m"                    # Default if not specified
        attendees: ["auto-extract"]
        description: "{body_summary}"
    require_approval: true                 # Ask before creating
```

### Email to Slack Notification

Forward important emails to relevant Slack channels:

```yaml
integrations:
  slack:
    - trigger:
        from: "*@bigclient.com"
      action:
        post_to_channel: "#client-bigcorp"
        format: |
          New email from BigCorp:
          From: {from}
          Subject: {subject}
          Summary: {body_summary_2_sentences}

    - trigger:
        label: "Urgent"
      action:
        post_to_channel: "#urgent"
        mention: "@here"
        format: |
          URGENT EMAIL
          From: {from}
          Subject: {subject}
          {body_first_paragraph}
```

---

## Cron Setup for Email Management

### Recommended Schedule

```bash
# Check email every 15 minutes during work hours (8 AM - 6 PM, Mon-Fri)
openclaw cron add --schedule "*/15 8-18 * * 1-5" \
  --task "Check Gmail for new emails. Triage by priority, apply labels, \
  create tasks for action items, and notify me on Telegram about urgent emails."

# Daily morning digest at 7:45 AM
openclaw cron add --schedule "45 7 * * 1-5" \
  --task "Generate comprehensive email digest: unread count, priority breakdown, \
  action items, meetings today. Send to Telegram."

# End of day summary at 5:30 PM
openclaw cron add --schedule "30 17 * * 1-5" \
  --task "End-of-day email summary: what was handled today, what needs attention \
  tomorrow, any pending drafts awaiting review. Send to Telegram."

# Weekly email analytics on Sunday evening
openclaw cron add --schedule "0 20 * * 0" \
  --task "Generate weekly email analytics: total received, response rate, \
  average response time, top senders, category breakdown. Save to \
  ~/email-reports/week-$(date +%Y-%W).md"
```

### Verifying Your Email Cron Jobs

```bash
openclaw cron list --filter email
```

```
ID  Schedule              Task                              Status    Last Run
5   */15 8-18 * * 1-5     Email triage and notification     Active    Feb 24, 14:15
6   45 7 * * 1-5          Morning email digest              Active    Feb 24, 07:45
7   30 17 * * 1-5         End of day email summary          Active    Feb 21, 17:30
8   0 20 * * 0            Weekly email analytics            Active    Feb 23, 20:00
```

---

## Privacy and Security Considerations

Email contains some of the most sensitive information in your digital life. Treat email automation security seriously.

### Data Handling

```yaml
# Privacy configuration
privacy:
  store_email_content: false               # Do not cache full email bodies
  store_metadata_only: true                # Only store from, subject, date, labels
  attachment_handling: "reference_only"     # Do not download attachments unless requested
  pii_detection: true                      # Warn about personally identifiable information
  encryption_at_rest: true                 # Encrypt stored email metadata
```

### Access Control

```yaml
# Access restrictions
access:
  gmail:
    read: true
    send: "draft_only"                     # Cannot send without approval
    delete: false                          # Never delete emails
    modify_labels: true
    forward: "restricted"                  # Only to approved addresses

  agentmail:
    read: true
    send: true                             # Can send from agent address
    delete: false
```

### Audit Trail

Every email action your agent takes is logged:

```bash
openclaw logs --limit 500 --plain | grep -i mail
```

```
2026-02-24 14:15:03 [EMAIL] Read 28 new emails from Gmail
2026-02-24 14:15:05 [EMAIL] Categorized: 2 urgent, 5 important, 12 info, 9 low
2026-02-24 14:15:06 [EMAIL] Applied labels: Finance(3), Meetings(2), Projects(5)
2026-02-24 14:15:07 [EMAIL] Drafted reply to boss@company.com (pending approval)
2026-02-24 14:15:08 [EMAIL] Sent notification to Telegram: 2 urgent emails
2026-02-24 14:16:22 [EMAIL] Approval received for draft to boss@company.com
2026-02-24 14:16:23 [EMAIL] Sent reply to boss@company.com via Gmail
```

> **Warning**
>
> Never give your agent permission to delete emails. Use archiving and labeling instead. A misconfigured deletion rule could wipe out your entire inbox. Treat email deletion as a human-only action.

---

## Complete Email Automation Configuration

Here is a full configuration that ties everything together. Both skills are entries in the same file, and the triage, auto-reply, integration, notification and privacy settings ride in the `gmail-bridge` entry's `config` bag because that is the skill this guide uses for them:

```json5
// ~/.openclaw/openclaw.json
{
  skills: {
    entries: {
      "gmail-bridge": {
        enabled: true,
        config: {
          gmail: {
            check_interval: 900, // 15 minutes
            max_emails_per_check: 50,
          },
          triage: {
            enabled: true,
            scoring: {
              vip_senders: ["boss@company.com", "wife@gmail.com", "*@bigclient.com"],
              vip_score: 95,
              work_domain_score: 70,
              newsletter_score: 10,
            },
            labels: {
              auto_apply: true,
              categories: ["Finance", "Meetings", "Projects", "Newsletters", "Personal"],
            },
          },
          auto_reply: {
            enabled: true,
            mode: "smart",
            default_approval: "draft", // default to draft mode
            auto_send_for: ["meeting_acknowledgment", "recruiter_decline", "newsletter_unsubscribe"],
          },
          integrations: {
            linear: { enabled: true, trigger_label: "Action Required" },
            notion: { enabled: true, trigger_label: "Finance" },
            calendar: { enabled: true, auto_create: false }, // require approval
            slack: {
              enabled: true,
              urgent_channel: "#urgent",
              client_channel: "#client-updates",
            },
          },
          notifications: {
            urgent: "immediate",
            important: "digest",
            normal: "daily_digest",
            low: "weekly_summary",
            channel: "telegram",
          },
          privacy: {
            store_content: false,
            audit_logging: true,
            encryption: true,
            pii_warnings: true,
          },
        },
      },
      agentmail: {
        enabled: true,
        config: {
          address: "alex-assistant@agentmail.dev",
          display_name: "Alex's Assistant",
          signature: "--\nSent by Alex's AI Assistant\nPowered by OpenClaw",
        },
      },
    },
  },
}
```

The Gmail OAuth token is not in that block on purpose, and `apiKey` is not its home either. The skills config reference calls that field a "Convenience field for skills that declare `metadata.openclaw.primaryEnv`", and it warns that `skills.entries.<skill>.env` and `apiKey` "apply to **host** runs only". An OAuth token belongs in the Gateway environment, and a sandboxed run needs the variable handed to it separately.

---

## Getting Started: A Step-by-Step Plan

If you are new to email automation, follow this gradual rollout plan:

### Week 1: Read-Only Monitoring

### Step 1: Install gmail-bridge and configure read-only access

### Step 2: Set up morning digest delivery to Telegram

### Step 3: Let the agent categorize and summarize without taking action

### Step 4: Review the agent's categorization accuracy daily

### Step 5: Adjust priority scoring rules based on what you observe

### Week 2: Labeling and Triage

### Step 1: Enable automatic labeling based on your refined rules

### Step 2: Configure the daily and end-of-day digests

### Step 3: Set up VIP sender notifications for immediate alerts

### Step 4: Start using email-to-task integrations (manually triggered)

### Week 3: Draft Responses

### Step 1: Enable draft mode for auto-replies

### Step 2: Review every draft before the agent sends it

### Step 3: Provide feedback by editing drafts so the agent learns your style

### Step 4: Set up AgentMail for a secondary use case (newsletters, support)

### Week 4: Semi-Autonomous

### Step 1: Enable auto-send for low-risk categories (meeting acknowledgments, recruiter declines)

### Step 2: Keep draft mode for important and urgent emails

### Step 3: Set up email-to-task automations on automatic triggers

### Step 4: Review weekly analytics to verify everything is working correctly

> **Tip**
>
> Patience is key. Email is personal and high-stakes. A bad auto-reply to your boss is worse than no reply at all. Take the time to train your agent's judgment through the draft-and-review process before enabling autonomous sending.

---

## Troubleshooting

### Common Issues

| Issue | Cause | Solution |
|-------|-------|----------|
| "OAuth token expired" | Google tokens expire periodically | Redo the OAuth consent flow described in the skill's own docs, or reinstall the skill with `openclaw skills install @<publisher>/gmail-bridge --force` |
| Emails not categorized correctly | Scoring rules need tuning | Review and adjust `triage.yaml` scoring rules |
| Drafts do not match my tone | Agent needs style examples | Add sample responses to `~/email-templates/` |
| AgentMail not receiving | DNS propagation delay | Wait 24 hours; check MX records with `dig` |
| Too many notifications | VIP list too broad | Narrow VIP sender criteria |
| Duplicate task creation | Multiple triggers matching | Add deduplication rules to integration config |

### Useful Debug Commands

There is no `openclaw skills test` or `openclaw skills logs`. The documented pair is a readiness check and the Gateway log, which `openclaw logs` tails as "Gateway file logs over RPC":

```bash
openclaw skills check
```

```bash
openclaw skills info gmail-bridge
```

```bash
openclaw logs --follow
```

---

## Next Steps

With email automation configured, consider these extensions:

- **Combine with browser automation**: research topics mentioned in emails, then draft informed responses
- **Connect to CRM**: automatically log email interactions with clients
- **Build an email analytics dashboard**: track response times, volume trends, and category distribution
- **Set up multi-agent email**: dedicated agents for work email vs personal email
- **Explore AgentMail's API**: build custom integrations beyond the standard skill

Email automation is one of the highest-ROI capabilities you can give your OpenClaw agent. Even a simple triage setup saves 30-60 minutes per day. A fully configured system can save hours and handle tasks you would never get around to manually.

## Frequently asked questions

**Where does an email skill's configuration go?**

Into the main config file. OpenClaw's skills config reference states that most skills configuration lives under skills in ~/.openclaw/openclaw.json, and each skill's own options sit on its entry at skills.entries.<key>.config, which the same page calls an optional bag for custom per-skill configuration fields.

**Is there a wizard for configuring an email skill?**

No. The documented openclaw skills subcommands are search, install, update, verify, list, info, check, library, curator and workshop, with no configure among them. Put the settings into ~/.openclaw/openclaw.json under skills.entries.<key> yourself, or through openclaw config set.

**Where should a Gmail OAuth token be stored?**

In the Gateway environment rather than in openclaw.json. The skills config reference describes skills.entries.<key>.apiKey as a convenience field for skills that declare metadata.openclaw.primaryEnv, and warns that env and apiKey apply to host runs only, so a sandboxed run needs the variable handed to it separately.

## Sources

- [OpenClaw: Skills config](https://docs.openclaw.ai/tools/skills-config)
- [OpenClaw: Configuration](https://docs.openclaw.ai/gateway/configuration)
- [OpenClaw: Skills CLI](https://docs.openclaw.ai/cli/skills)
- [OpenClaw: Logs](https://docs.openclaw.ai/cli/logs)
- [OpenClaw: Logs](https://docs.openclaw.ai/cli/logs)