Email Operations for Openclaw

A comprehensive AI agent skill for managing full-lifecycle email communication through SMTP and IMAP protocols.

yiweiweilai
v2.0.1
Apr 9, 2026
0
749
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install email-operations

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 email-operations 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 Email Operations?

The Email Operations skill is a robust tool designed for Openclaw Skills to provide AI agents with full control over email accounts. It facilitates a wide range of actions, from basic inbox monitoring to complex automated sending of HTML emails with attachments. By bridging the gap between LLMs and standard mail protocols like SMTP and IMAP, this skill allows for seamless integration of email workflows into automated coding and research tasks.

Built with developer productivity in mind, it supports major global and regional email providers including Gmail, Outlook, QQ Mail, and 163 Mail. Whether you need to parse incoming notifications or distribute automated reports, this skill provides the necessary programmatic and CLI interfaces to manage communications effectively within the Openclaw Skills ecosystem.

Email Operations Use Cases

  • Automatically monitoring an inbox for specific keywords like "invoice" or "report" and extracting data.
  • Sending automated, high-fidelity HTML newsletters or system alerts to team members.
  • Searching through massive archives of historical emails to find specific sender information or dates.
  • Automating the download and local storage of email attachments for further processing by other agents.
  • Batch sending personalized emails to a list of recipients for outreach or internal updates.

How Email Operations Works

  1. The skill loads secure credentials from a local .env file located within the skill directory.
  2. It initializes an EmailClient that connects to the specified IMAP server for retrieval or SMTP server for transmission.
  3. For reading tasks, the client fetches message headers or full bodies, converting complex MIME structures into clean JSON data.
  4. For search tasks, it applies filters (sender, date, keyword) directly at the server level to optimize performance.
  5. For sending tasks, it constructs multi-part messages, handles encoding, and transmits them through the configured secure mail gateway.

Email Operations Setup

To get started, configure your credentials in skills/email-operations/.env. Most modern providers require an App-Specific Password rather than your primary login password.

# Configure your environment
[email protected]
EMAIL_IMAP_PASSWORD=your_app_password
EMAIL_SMTP_PASSWORD=your_app_password

# Optional: Override default server settings
EMAIL_IMAP_HOST=imap.gmail.com
EMAIL_IMAP_PORT=993

You can test the setup using the built-in CLI module:

# List the 10 most recent emails
python -m scripts.email_client --action list --count 10

Email Operations Data Schema & Taxonomy

The skill returns structured data for both summaries and detailed views to ensure compatibility with Openclaw Skills workflows:

Attribute Description
uid Unique identifier for the message on the IMAP server
subject The subject line of the email
from Sender information (includes name and email address)
body Object containing plain text and html content
attachments List of metadata for attached files (name, size, type)
flags Status indicators such as seen, starred, or answered

Email Operations Advanced Features

  • Native support for SSL/TLS and STARTTLS to ensure secure communication with mail servers.
  • Intelligent encoding detection that automatically handles UTF-8 and GBK to prevent text corruption in international emails.
  • Ability to send emails using local text or HTML files as the message body for complex templates.
  • Robust attachment management allowing agents to save files directly to specific local paths.
  • Multi-folder support to navigate beyond the inbox into Sent, Drafts, or custom labels.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*