← Back to Index

Gmail Tools

Architecture

Two Gmail accounts:

OAuth Setup

Status: ✅ Complete (Feb 10, 2026)
Token file: /home/node/.openclaw/credentials/google-gmail-tokens.json
Scopes: gmail.send + gmail.readonly
Refresh token: Saved (permanent access)

Available Tools

1. gmail-send.py - Send emails from minnie@ztag.com

python3 gmail-send.py --to EMAIL --subject SUBJECT --body BODY [--from-name NAME]

Examples:

# Charlie accounting report
python3 gmail-send.py \
  --to charlie@ztag.com \
  --subject "Weekly Reconciliation Report" \
  --body "$(cat report.txt)" \
  --from-name "Minnie Accounting"

# Calendar update
python3 gmail-send.py \
  --to quan@ztag.com \
  --subject "Meeting Tomorrow: 2pm PT" \
  --body "Reminder: Dev meeting at 2pm PT"

2. google-gmail.py - Read minnie@ztag.com inbox

python3 google-gmail.py --account minnie@ztag.com --hours 24 --limit 10

3. gmail-fetch.py - Monitor quan@ztag.com (app password)

python3 gmail-fetch.py --hours 24 --limit 50

Used by morning briefing and heartbeat.

4. gmail-smart-triage.py - AI classification of emails

python3 gmail-smart-triage.py --hours 48 --limit 50

Classifies emails as Important/Normal/Noise using AI (not keywords).

OAuth Utilities (one-time setup)

Use Cases

Ready Now:

🔄 Pending: