Help for owners
n8n says my Google or other credentials expired or are unauthorized
Short answer
For Google credentials set up on a self-hosted n8n, an OAuth app left in Testing mode with external users has consent and tokens that expire after seven days, according to n8n's documentation. Reconnecting fixes it for a week. The lasting fix is correct app settings, a redirect address that matches exactly, and an alert when a credential fails.
Does this sound like your situation?
- Google nodes work for about a week, then fail with unauthorized.
- I reconnect and it works again, until it breaks again.
- The login window says access denied, or the redirect does not match.
- It broke after I moved n8n to a new address or domain.
- Only some people on my team can connect.
Why does this happen?
The Google app is in Testing mode
n8n's guide says that with user type External the app defaults to Testing, only listed test users can complete the sign-in, and consent and tokens expire after seven days. Reconnecting in the credentials window is the stop-gap.
Confirmed by docs.n8n.io
The redirect address must match exactly
The OAuth redirect URL shown in the n8n credential has to be added to the authorised redirect URIs in Google, including protocol and port. A changed domain, a switch to HTTPS or an added proxy breaks the match.
Confirmed by docs.n8n.io
Self-hosted needs your own Google app
n8n's guide says that self-hosted users create a Custom OAuth2 credential: a Google Cloud project, the right APIs enabled, an OAuth consent screen, a web application client and its client ID and secret. Some services need extra APIs, such as Drive for Docs and Sheets.
Confirmed by docs.n8n.io
Updates can change how OAuth callbacks are handled
n8n's 2.0 breaking-changes page lists that OAuth callbacks require authentication by default. After an update, a connection flow that worked before can behave differently.
Confirmed by docs.n8n.io
The person who connected it left
A credential tied to one person's Google account stops when that person's access is removed or their password is reset.
Technical detail: Google sign-in stops with Error 400: redirect_uri_mismatch
What can I do about it today?
- Reconnect the credential onceOpen the credential in n8n and reconnect. This is safe and gets your workflows going.
- Note who is signed inWhich Google account the credential uses and whether it is a personal or shared business account.
- Do not create many new credentialsDuplicates make it harder to know which one each workflow uses.
- Check the sign-in window messageRedirect mismatch, access denied and unverified app are different problems. Copy the text for your developer.
- Ask who owns the Google Cloud projectIt should belong to your company, not a former employee or contractor.
When should I bring someone in?
- The credential fails again within days of reconnecting.
- The project belongs to someone who has left.
- Google shows an unverified-app warning or blocks sign-in.
How do I handle it?
- Find which credential and which kind of failureFrom the execution error I identify the credential, the service and whether it is an expiry, a redirect mismatch or a permission problem.
- Check the Google app settingsI read the project's consent screen, publishing status, test users and redirect addresses against n8n's guide.
- Fix ownershipThe project and the connected account move to your company, with a shared business account rather than one person's.
- Make failures visibleA failed credential raises an alert through an error workflow, so a broken connection is found at once.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
How do I move out of Testing mode?
n8n's page does not describe how to move to production. Google's own consent screen documentation covers publishing, and that step may trigger a verification review, so I read Google's current rules first.
Does this apply to n8n Cloud?
n8n's guide says Cloud users can use managed OAuth2 for the listed Google nodes with a Sign in with Google button, with no Google Cloud setup.
Is it only Google?
The seven-day limit described there is specific to Google apps in Testing mode. Other services have their own rules, which I read from that service's documentation.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.