Email Reader for Openclaw

A powerful skill that allows AI agents to read, search, and manage Gmail messages directly via the gog CLI.

coorops25
v1.0.0
Feb 27, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install gmailcleaner

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 gmailcleaner 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 Reader?

The Email Reader skill empowers your AI agent to interact with Gmail accounts with precision. By leveraging the gog CLI, it can fetch unread messages, search through specific labels, and retrieve threaded conversations using standard Gmail search syntax. This integration is essential for developers building autonomous agents that need to stay updated on communications or process incoming data from emails.

These Openclaw Skills provide a bridge between your local environment and the cloud-based Gmail service, ensuring secure and efficient data retrieval. It handles everything from simple inbox checks to complex filtered searches across various folders and custom user labels.

Email Reader Use Cases

  • Monitoring the primary inbox for new or unread messages.
  • Searching for specific documents or information across all Gmail folders and labels.
  • Analyzing recent communication threads from specific senders or regarding specific projects.
  • Identifying and summarizing high-priority emails received within a specific timeframe.
  • Checking system folders like Spam, Sent, or Trash for auditing or retrieval.

How Email Reader Works

  1. The AI agent identifies an email-related request from the user, such as checking for new messages or searching for a specific topic.
  2. The skill constructs a specialized search query using Gmail native search operators like in:inbox or newer_than:1d.
  3. It executes the gog gmail search command, passing the query and the --json flag to ensure structured data output.
  4. The agent parses the returned JSON objects to extract key information including sender details, subject lines, and message snippets.
  5. A summary or the specific requested content is presented to the user for further action or analysis.

Email Reader Setup

To get started with this skill, you first need to install the gog CLI using Homebrew:

brew tap steipete/tap
brew install gogcli

Once installed, perform the one-time authentication and configuration:

gog auth credentials /path/to/client_secret.json
gog auth add $GOG_ACCOUNT --services gmail
gog auth list

Ensure the GOG_ACCOUNT environment variable is set to your Gmail address (e.g., yourname@gmail.com).

Email Reader Data Schema & Taxonomy

The Email Reader skill utilizes structured data to provide the agent with accurate context. The output typically includes:

Field Description
id The unique identifier for the Gmail message
threadId The identifier for the conversation thread
snippet A brief preview of the email content
labelIds A list of labels applied to the message (e.g., UNREAD, INBOX)
payload Contains the full headers, body parts, and metadata of the email

Email Reader Advanced Features

  • Multi-account support for managing different Gmail profiles via the --account flag.
  • Support for advanced Gmail search syntax, including boolean operators and attachment filters.
  • Automated mode compatibility using the --no-input flag for non-interactive environments.
  • Granular time-based filtering (e.g., after:YYYY/MM/DD or older_than:30d).
  • Full access to system labels like Starred, Drafts, and Trash, alongside custom user-defined folders.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*