my workflow usually gives error and i keep having to re-authenticate again. to solve, i have to go into my Credentials and sign in with Google.
any idea what i can do to make it work without “Sign in with Google?”
my workflow usually gives error and i keep having to re-authenticate again. to solve, i have to go into my Credentials and sign in with Google.
any idea what i can do to make it work without “Sign in with Google?”
Hi @hasti
Any app left in Testing mode automatically has its refresh tokens revoked every 7 days. Once that 7-day timer hits, n8n loses access, and you are forced to manually click that “Sign in with Google” button all over again.
you don’t actually need to get the app officially verified by Google for personal use. You just need to push it out of testing.
Go to Google Cloud Console → APIs & Services → OAuth consent screen
Under Publishing status, click PUBLISH APP
Confirm the dialog — your status changes from “Testing” to “In production”
Go back to n8n and re-authenticate one final time (click “Sign in with Google”)
Google may show a “Google hasn’t verified this app” warning — click Advanced → Go to [Your App Name] (unsafe) to proceed.
This is safe because you are both the developer and the user.
Hey @hasti,
Welcome to the community!
You can avoid this error by either of the below ways
Open Google Cloud Console → APIs & Services → OAuth consent screen
If status is Testing, click Publish App (switch to In production)
Go back to n8n → Credentials → your Google OAuth credential
Click Sign in with Google one last time to generate a non-expiring refresh token
Or
In Google Cloud Console → create a Service Account
Generate/download the JSON key
Share the needed Drive/Sheets files/folders with the service account email (…@…iam.gserviceaccount.com)
In n8n → Credntials create Google Service Account credential using the JSON key and use that credential in your nodes
Welcome to the community @hasti
Instead of OAuth2 (which requires periodic re-authentication), switch to Service Account authentication for Google services. This provides:
No expiring tokens
No manual re-authentication needed
More reliable for automated workflows
Steps to set up:
Go to Google Cloud Console
Create a Service Account for your project
Download the JSON key file
In n8n, create a new credential using “Service Account” instead of OAuth2
Upload the JSON key file
Update your workflow nodes to use the new Service Account credential
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.