Gmail Automation Skill for Openclaw

An advanced AI-driven utility for summarizing unread emails, managing label hierarchies, and automating inbox maintenance via background tasks.

r39132
v1.2.0
Feb 13, 2026
0
2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install gmail-skill

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-skill 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 Automation Skill?

The Gmail Automation Skill is a robust integration designed for AI agents to perform complex email management tasks through a command-line interface. By leveraging the gog utility, it allows agents to interact with the Gmail API to search, read, and organize messages with high precision. This tool is a core part of the Openclaw Skills ecosystem, providing developers with reliable scripts for background execution and notification handling.

This skill goes beyond simple reading by offering sophisticated maintenance features such as spam purging, label deletion, and date-based message removal. It emphasizes reliability by using background wrappers that ensure long-running tasks complete successfully even if the agent session times out, providing updates through external channels like WhatsApp.

Gmail Automation Skill Use Cases

  • Generate concise summaries of unread inbox messages to stay updated without manual checking.
  • Automate the cleanup of spam and trash folders to maintain a lean mailbox.
  • Reorganize messy inboxes by moving messages to specific labels following an interactive confirmation flow.
  • Bulk delete or archive old messages based on specific dates and label criteria.
  • Set up daily email digests that provide a summary of unread mail and perform routine maintenance automatically.

How Gmail Automation Skill Works

  1. The agent identifies the user's intent related to Gmail management and verifies the $GMAIL_ACCOUNT environment variable.
  2. For simple queries like inbox summaries, the agent executes direct gog commands to fetch message metadata in TSV format.
  3. For complex or time-consuming operations, the agent utilizes a background task wrapper that daemonizes the process.
  4. These background processes provide periodic status updates and final reports, often integrated with WhatsApp for asynchronous user notification.
  5. Destructive actions follow a multi-step verification process, requiring specific user confirmation strings like DELETE before execution.
  6. For permanent data removal, the skill can escalate permissions through a dedicated full-scope authorization script.

Gmail Automation Skill Setup

To get started with this skill within the Openclaw Skills framework, ensure the gog binary is installed and set your account variable:

export GMAIL_ACCOUNT="[email protected]"

To enable permanent deletion of messages (bypassing the trash), run the one-time full-scope authorization script:

bash skills/gmail-skill/bins/gmail-auth-full-scope.sh "$GMAIL_ACCOUNT"

Gmail Automation Skill Data Schema & Taxonomy

The skill organizes and reports data using structured formats to ensure the AI agent can parse results accurately:

Data Component Format Description
Message Lists TSV Contains ID, Thread, Date, From, Subject, and Labels
Label Hierarchy Tree View Displays parent/child label relationships with message counts
Job Status JSON/Text Tracks background task progress, success, or failure states
Auth Storage JSON Stores OAuth tokens securely in the ~/.gmail-skill/ directory

Gmail Automation Skill Advanced Features

  • Background task daemonization allows for operations that outlive the agent's immediate execution window.
  • Integrated WhatsApp progress reporting ensures users are notified of task completion asynchronously.
  • Support for permanent message deletion via full-scope API tokens for advanced storage management.
  • Daily digest automation scripts that combine unread summarization with automated inbox cleaning.
  • Interactive label management including deep search and recursive label deletion options.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*