Gmail Agent for Openclaw

A comprehensive AI assistant for summarizing unread messages, auditing label structures, and automating Gmail inbox maintenance.

r39132
v1.0.0
Feb 9, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install gmail-agent

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 gmail-agent 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 Gmail Agent?

The Gmail Agent is a specialized skill designed to transform your AI assistant into a personal email concierge. By leveraging powerful command-line tools, it allows users to quickly digest large volumes of unread mail, visualize complex label hierarchies, and perform surgical cleanups of their inbox. As part of the ecosystem of Openclaw Skills, this tool ensures you can maintain a clean digital workspace without manual sorting.

This skill is particularly effective for power users who manage multiple labels and high email volumes. It provides a safety-first approach to data management, distinguishing between single-label messages and multi-label messages to ensure that automated cleanups never result in accidental data loss.

Gmail Agent Use Cases

  • Summarizing unread messages in the main inbox or across all folders for a quick daily briefing.
  • Visualizing the entire Gmail folder structure with real-time message and unread counts.
  • Auditing specific label hierarchies to identify and remove redundant or old messages.
  • Automating the daily purging of spam and trash folders to keep storage usage low.
  • Grouping high volumes of emails from specific senders to prevent notification fatigue.

How Gmail Agent Works

  1. The agent detects an email-related request and retrieves the user's account details from the environment configuration.
  2. It executes optimized search queries via the gog CLI to fetch message metadata like headers, senders, and subjects.
  3. For folder management, it runs specialized shell scripts that parse label hierarchies into a readable tree format.
  4. When performing audits, the skill analyzes whether messages are associated with single or multiple user labels to prevent deleting important cross-referenced data.
  5. Upon user confirmation, it executes cleanup commands and provides a detailed report of deleted versus skipped items.

Gmail Agent Setup

To use this skill, ensure the gog binary is installed in your path and provide your Gmail address via the environment variable.

# Set your Gmail account
export GMAIL_ACCOUNT="[email protected]"

# Ensure the gog binary is authenticated
gog gmail auth login --account "$GMAIL_ACCOUNT"

Gmail Agent Data Schema & Taxonomy

The skill processes and organizes email data into structured formats for clear reporting:

Data Type Attributes Captured Output Format
Email Messages ID, Thread, Date, From, Subject, Labels TSV Table / Formatted Summary
Label Structure Label Name, Total Count, Unread Count Hierarchical Tree
Audit Results Single-Label (Safe), Multi-Label (Skipped) Deduplicated Audit Table
Cleanup Logs Spam Count, Trash Count Status List

Gmail Agent Advanced Features

  • Context-aware summarization modes that distinguish between primary inbox messages and global unread mail.
  • Multi-level label hierarchy visualization using nested indentation for complex folder structures.
  • Safety-guaranteed label cleanup that preserves messages tagged with multiple user-defined labels.
  • Automated daily cron-job support that combines unread summaries and inbox maintenance in a single scheduled report.
  • Intelligent grouping of bulk messages by sender when unread counts exceed specific thresholds.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*