#Hey! I just created a Gmail account for my agent and want to give it access to read/send emails. Wha
1 messages · Page 1 of 1 (latest)
For OpenClaw, the “preferred” path is basically Gmail API + OAuth — and the project already has an opinionated integration around that via gog (gogcli), rather than IMAP/SMTP.
Recommended approach (what’s supported / documented)
- Use
gog(Google Suite CLI) with OAuth for Gmail access (read/search/send), and call it from the agent (typically viaexec, or via a Lobster workflow if you want approval-gated side effects). - If you also want “new email arrived → wake the agent”, OpenClaw supports a Gmail Pub/Sub → webhook flow with a preset mapping + helper CLI:
- Docs: https://docs.openclaw.ai/automation/gmail-pubsub
- Config reference (the exact
hooks.gmail.*keys): https://docs.openclaw.ai/gateway/configuration-reference#gmail-integration - Wizard command:
openclaw webhooks gmail setup --account <email>
gog itself is documented/linked here: https://gogcli.sh/
IMAP/SMTP + App Passwords (why it’s usually not the best default)
It can work for a quick prototype, but it’s not the path we recommend because:
- App passwords require 2FA, and are not available for some account/security policies.
- Google keeps tightening “simple” auth flows; IMAP can get flaky (CAPTCHAs, security challenges, random lockouts).
- No nice “watch/push” story (you end up polling).