Send 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.
bash
export GMAIL_USER="your-email@gmail.com"
export GMAIL_APP_PASSWORD="xxxxxxxxxxxxxxxx"
bash
# Clone or copy to skills directory
cp -r gmail-tool ~/.openclaw/workspace/skills/
# Or use ClawHub
clawhub install gmail-tool
bash
chmod +x gmail-tool
./gmail-tool send "recipient@example.com" "Subject" "Body text"
bash
# Read last 5 emails
./gmail-tool read
# Read last 10 emails
./gmail-tool read 10
bash
# 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"
CommandUsagesend <to> <subject> <body>Send an emailread [count]Read last N emails (default: 5)
VariableRequiredDescriptionGMAIL_USERYesYour Gmail addressGMAIL_APP_PASSWORDYes16-char App Password
Send failed: "535 5.7.8 Username and Password not accepted"
Read failed: "Too many simultaneous connections"
MIT
junkaixue