Install
openclaw skills install gmail-toolSend and read Gmail messages via CLI using App Password, supporting SMTP for sending and IMAP for reading emails.
openclaw skills install gmail-toolSend and read emails via Gmail using App Password. CLI utility for automated alerts, notifications, and email monitoring.
A CLI tool to send and read emails through Gmail. Combines SMTP (send) and IMAP (read) in one utility.
Enable 2-Factor Authentication on your Google Account:
Generate an App Password:
Set environment variables:
export GMAIL_USER="your-email@gmail.com"
export GMAIL_APP_PASSWORD="xxxxxxxxxxxxxxxx"
# Clone or copy to skills directory
cp -r gmail-tool ~/.openclaw/workspace/skills/
# Or use ClawHub
clawhub install gmail-tool
chmod +x gmail-tool
./gmail-tool send "recipient@example.com" "Subject" "Body text"
# Read last 5 emails
./gmail-tool read
# Read last 10 emails
./gmail-tool read 10
# 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"
| Command | Usage |
|---|---|
send <to> <subject> <body> | Send an email |
read [count] | Read last N emails (default: 5) |
| Variable | Required | Description |
|---|---|---|
| GMAIL_USER | Yes | Your Gmail address |
| GMAIL_APP_PASSWORD | Yes | 16-char App Password |
Send failed: "535 5.7.8 Username and Password not accepted"
Read failed: "Too many simultaneous connections"
MIT
junkaixue