Apple Mail Channel Setup & Configuration for Openclaw

An Apple Mail channel plugin for OpenClaw and Hermes that enables AI agents to read, process, and automatically reply to email threads on macOS via AppleScript.

jehadurre
v1.0.1
Jun 22, 2026
0
364
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install apple-mail-setup

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install apple-mail-setup using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Apple Mail Channel Setup & Configuration?

The Apple Mail Channel skill connects your macOS mail application directly to your AI agents, turning your local inbox into an automated assistant. By integrating with local mail accounts, this skill allows agents to seamlessly monitor, parse, and respond to incoming emails. It relies on secure local AppleScript execution, ensuring that your communication data remains safely managed within your macOS ecosystem while leveraging advanced automation.

As part of the broader ecosystem of Openclaw Skills, this plugin brings native desktop integration to your automated workflows. It handles everything from deep sanitization of incoming HTML emails to smart threading that isolates conversations. This ensures your AI assistant can parse high-fidelity data, preserve Markdown tables, and generate contextual replies without cross-contaminating client conversations.

Apple Mail Channel Setup & Configuration Use Cases

  • Automated Customer Support: Monitor support inboxes, draft contextual replies, and automatically archive completed threads to streamline response times.
  • Workday Inbox Triage: Allow an AI agent to read incoming emails, summarize urgent tasks, and separate critical work threads from low-priority newsletters.
  • Executive Assistant Automation: Define a security allowlist of priority senders (like managers or VIP clients) and let the agent automatically draft professional replies for your review.
  • Local Desktop Workflows: Utilize native macOS automation to manage multiple accounts (like iCloud, Gmail, or Exchange) without needing complex cloud-based IMAP integrations.

How Apple Mail Channel Setup & Configuration Works

  1. Initialization: The OpenClaw or Hermes runner starts and initializes the local Apple Mail channel via AppleScript.
  2. Periodic Polling: The plugin queries configured macOS mail accounts at customizable intervals (e.g., every 30 seconds) to detect unread emails.
  3. HTML Sanitization and Parsing: Upon finding a new message, the plugin extracts raw HTML, sanitizes malicious content, converts formatting (such as tables) to Markdown, and cleans the message for AI readability.
  4. Session Isolation: A dedicated, isolated session is established for the email thread to prevent context mixing with other parallel conversations.
  5. Agent Inference & Reply: The active AI agent processes the thread context and generates a response, which the plugin transmits back through Apple Mail's outbound SMTP configurations.

Apple Mail Channel Setup & Configuration Setup

Installation

Install the plugin globally or locally in your project directory using ClawHub or npm:

# Via ClawHub
openclaw plugins install @jehadurre/openclaw-apple-mail

# Or via npm
npm install @jehadurre/openclaw-apple-mail

Verify that the plugin is properly registered with your environment:

openclaw plugins list

Configuration

Add the configuration to your openclaw.json or Hermes setup file, specifying the macOS accounts to monitor:

{
  "channels": {
    "apple-mail": {
      "enabled": true,
      "accounts": {
        "work": {
          "email": "[email protected]",
          "mailboxAccount": "Exchange",
          "allowFrom": ["*"],
          "pollIntervalMs": 15000,
          "archiveOnReply": true
        }
      }
    }
  }
}

System Permissions

Because this plugin leverages AppleScript to interact with your native macOS mail application, you must grant automation permissions:

  1. Open System Preferences → Security & Privacy → Privacy.
  2. Select Automation from the left-hand sidebar.
  3. Locate your Terminal app or OpenClaw runner and ensure the checkbox to control Mail.app is enabled.

Apple Mail Channel Setup & Configuration Data Schema & Taxonomy

The channel manages configuration settings and dispatches events based on the system's operational lifecycle.

Configuration Options

Parameter Type Default Description
enabled boolean true Globally enable or disable the Apple Mail channel.
email string Required Your exact email address configured in Apple Mail.
mailboxAccount string "iCloud" Name of the mailbox account provider in Apple Mail.
allowFrom array [] Sender allowlist. Use ["*"] to allow all, or specify individual email addresses.
pollIntervalMs number 30000 Frequency in milliseconds to scan for new messages.
archiveOnReply boolean false Automatically archive the email thread within Apple Mail after a reply.

Supported Event Architecture

The Apple Mail plugin operates as a system event driver, emitting the following hooks for Openclaw Skills to utilize:

  • email:received: Dispatched when a new incoming email satisfies the allowlist filtering.
  • email:sent: Emitted immediately after an AI-generated reply is successfully sent via macOS.
  • session:created: Triggered when a new conversational thread establishes an isolated agent context.
  • session:archived: Emitted if a thread is automatically or manually archived following a reply.

Apple Mail Channel Setup & Configuration Advanced Features

  • Multi-Account Coexistence: Set up independent monitoring parameters for personal and professional accounts simultaneously, maintaining distinct allowlists and polling frequencies.
  • Custom Thread Session Isolation: Automatically manages conversational history under isolated state sessions, ensuring the AI model does not leak contexts between completely different threads.
  • AppleScript Security Sandboxing: Uses local execution APIs to route operations safely through macOS's security sandboxing layer, keeping credential storage local.
  • Post-Reply Automations: Enable automatic workflow behaviors like archiveOnReply to archive message threads as soon as the agent dispatches the response email.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*