How to Stop n8n Credentials From Expiring Every Week

If you’ve been hitting that annoying “credentials expired” error every week with Google nodes, you’re not alone. This isn’t a bug in your workflow, it’s how OAuth2 tokens work by default. They expire after 7 days, and you end up manually re-authenticating over and over.

Why This Happens

Quick breakdown:

  • Access token - the actual key n8n uses to talk to Google services. Expires after 1 hour.

  • Refresh token - a long-term key that automatically fetches new access tokens without you logging in again.

The issue? When your Google Cloud app is in “Testing” mode, refresh tokens get revoked after 7 days. That’s the root cause.

The Fix

  1. Go to Google Cloud Console → OAuth Consent Screen

  2. Navigate to the Audience tab

  3. Click Publish App (push to production from Testing)

That’s it. You don’t need to submit for Google verification if you’re only using it for yourself. You’ll see a warning screen during auth (“Google hasn’t verified this app”), just click Advanced → Go to App (unsafe) to bypass it.

Quick Checklist

  • Make sure your redirect URL is exactly: https://[YOUR-N8N-DOMAIN]/rest/oauth2-credential/callback or the localhost

  • If you add new scopes later (like adding Gmail to existing Drive credentials), you’ll need to re-authenticate once to get a fresh refresh token that covers all scopes.

After this, your workflows should run without the weekly re-auth dance.

Source Link: How to fix n8n credentials from expiring

Thanks for sharing! I ran into this as well. Strange that in my case the token still expires even after the app is published.

It looks like this issue has affected a lot of self-hosted users. As a workaround, I now use Google service account credentials in some cases, which never expire. I also put together a tutorial on this in case anyone finds it helpful.