r/openclaw • u/Tricky-Ad-9044 • 2d ago
Help Problems setting up gmail
As the title says I settled up an agent to scan my gmail to filter bills, spam etc, I needed to create a bot in google cloud console but the token gets revoked if I cant verify the app (lot lf issued with that).
How are you guys doing it? Is there other way?
1
Upvotes
•
u/AutoModerator 2d ago
Welcome to r/openclaw Before posting: • Check the FAQ: https://docs.openclaw.ai/help/faq#faq • Use the right flair • Keep posts respectful and on-topic Need help fast? Discord: https://discord.com/invite/clawd
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/atlascirrus 2d ago
the revoking is almost always the "testing" publishing status. google's oauth docs say an external app in testing gets refresh tokens that expire after 7 days, so it works for a week and then dies.
you don't actually need verification if it's just you using it. flip the consent screen to in production, click through the "google hasn't verified this app" warning once when you sign in, and the token stops expiring (unverified apps are just capped at 100 users). if it's a workspace account and the project sits under your workspace org, you can set the user type to internal and skip that warning entirely.
google's help page also mentions a personal mode setup that locks the app to only your own account, haven't tried that one myself tho. which scopes are you asking for, just gmail.readonly or modify too?
1
u/Panzrom New User 2d ago
I also set it up this way with
gogcli auth add <email> --manual. The token always expired after a week, so i had to create a google cloud project and publish a placeholder app. It was pretty annoying but it did work and the token never expired again since then.1
u/moosepiss Pro User 1d ago
The hoops you need to jump through to connect gog to Gmail is confusing, even after doing it several times. As someone else mentioned, flipping that Oauth consent screen to production is necessary.
I've ended up taking a different route. I do not give my agent/gog access to my Gmail at all anymore. Instead, I use Google/Gemini tools to keep my inbox tidy. I forward my Gmail to a agent-specific email address, giving me control over what my agent sees and air-gapping (safety) my agent from my main Google account.
I've also found that the annoying "+cc" Gmail AI summary that appears in my inbox automatically every day is actually a pretty useful thing to forward to my agent for the context it needs to prepare my daily briefing.
1
u/mlaihk 22h ago
Do note that Google very recently changed their terms of access, and from Feb 2027 on all AI Agents must ONLY USE GOOGLE MCP OR OFFICIAL gwscli TO ACCESS google workspace and gmail........ AI Agents using gogcli or other tools to access google workspace via REST API is explicitly prohibited...... So for all of us using gogcli, we will have to migrate or face ban on account.......