Gmail Tool

# Gmail Tool

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Gmail Tool" with this command: npx skills add junkaixue/gmail-tool

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="your-email@gmail.com"
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 "recipient@example.com" "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 "admin@example.com" "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 "you@example.com" "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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Google Docs Formatter

Instruction-only workflow for formatting, editing, and creating Google Docs using the existing gog skill/CLI. Use when a user asks to format a Google Doc, co...

Registry SourceRecently Updated
Coding

vibe-coding-skills-installer

Install vibe coding skill sets (openspec, gstack, superpowers) for any supported agent platform (Cursor, Claude Code, Codex, etc.). Interactively asks about...

Registry SourceRecently Updated
Coding

基于课程内容说明生成图文并茂的的PPT

高校教师课程PPT生成技能。当老师需要制作教学内容课件、备课PPT、教学演示文稿、实验指导手册时触发。支持数据科学、大数据技术、Python编程、深度学习、机器学习、数据可视化等多个学科领域。触发词:课程PPT、制作课件、备课PPT、教学演示、实验指导。

Registry SourceRecently Updated
Coding

HSCIQ MCP - Customs Query

HS Code Lookup for Chinese Products. Query customs codes, tariff rates, declaration elements, and regulatory requirements via HSCIQ MCP API. Create classific...

Registry SourceRecently Updated
5320toucao