Hi!
I’ve followed the documentation and created a new Google OAuth2 Credential to connect n8n to Gmail, Drive, and Calendar APIs. Everything works fine – the connection is active, and I can successfully use the integration. However, the issue is that the connection only lasts 60 minutes because no refresh token is generated.
Here’s what I’ve done so far:
- My app is in testing mode, so I expect the connection to last for 7 days (which would be sufficient for now).
- I created a new OAuth 2.0 Client in Google Cloud Console and ensured I’m using the correct Redirect URI:
https://oauth.n8n.cloud/oauth2/callback
. - I’ve enabled all necessary APIs and added the correct scopes (Gmail, Drive, Calendar, etc.).
- The connection works without issues, but no refresh token is generated, and the connection expires after 60 minutes.
I’ve havent been able to check if access_type=offline
and prompt=consent
is included from n8n, as I’ve seen mentioned in other posts here in the community n8n should handle this automatically as i understand.
Is there something I might have missed? Or could this be related to how n8n handles credentials in testing mode?
Thanks for your help!