ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Gmail Tool

Skill by junkaixue

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/junkaixue/gmail-tool
Or

Gmail Tool

Send and read emails via Gmail using App Password. CLI utility for automated alerts, notifications, and email monitoring.

Overview

A CLI tool to send and read emails through Gmail. Combines SMTP (send) and IMAP (read) in one utility.

Requirements

  • Python 3.6+
  • Gmail account with App Password enabled

Setup

  1. Enable 2-Factor Authentication on your Google Account:

  2. Generate an App Password:

  3. Set environment variables:

export GMAIL_USER="[email protected]"
export GMAIL_APP_PASSWORD="xxxxxxxxxxxxxxxx"

Installation

# Clone or copy to skills directory
cp -r gmail-tool ~/.openclaw/workspace/skills/

# Or use ClawHub
clawhub install gmail-tool

Usage

Send Email

chmod +x gmail-tool
./gmail-tool send "[email protected]" "Subject" "Body text"

Read Emails

# Read last 5 emails
./gmail-tool read

# Read last 10 emails
./gmail-tool read 10

Examples

# Send notification
./gmail-tool send "[email protected]" "Alert" "Server down!"

# Check inbox
./gmail-tool read 3

# Cron job - check and alert
0 9 * * 1-5 ./gmail-tool read 1 | grep -q "Important" && ./gmail-tool send "[email protected]" "Check Email" "Found important email"

Commands

CommandUsage
send <to> <subject> <body>Send an email
read [count]Read last N emails (default: 5)

Environment Variables

VariableRequiredDescription
GMAIL_USERYesYour Gmail address
GMAIL_APP_PASSWORDYes16-char App Password

Security Notes

  • Never commit App Passwords to version control
  • Use environment variables, never hardcode credentials
  • App Passwords are 16 characters (no spaces)
  • Revoke app passwords if compromised

Troubleshooting

Send failed: "535 5.7.8 Username and Password not accepted"

  • Verify App Password is correct
  • Make sure 2FA is enabled

Read failed: "Too many simultaneous connections"

  • Gmail limits IMAP connections. Wait and retry.

License

MIT

Author

junkaixue

Metadata

Author@junkaixue
Stars1865
Views0
Updated2026-03-03
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-junkaixue-gmail-tool": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.