Recurring Google Services Authentication Issue in Self-Hosted n8n #2

Google Drive, Gmail and many other Google Products keep disconnecting in my n8n instance. Clicking on “Sign in with Credentials” reconnects immediately, but it only stays connected for a couple of days before requiring me to reestablish the connection again.

I’m hosting n8n on a GCP instance but didn’t have these connection problems before. The OAuth tokens seem to be expiring frequently, requiring manual reconnection every few days.

Tried to add a service account to that account but realized that this account already had a service account connected to it. I also added a daily workflow which uses these APIs connected to that account yet still after 3-4 days it diconnects again and the workflows fail.

Information on your n8n setup

  • n8n version: 1.88
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): GCP docker
  • Operating system: Windows10

If the app is under testing mode. The token will only valid for 7 days.

I think you are using the OAuth on your own. So you can just activate the app without going verify. Then the token will last forever.
But you can not let other google user to use your oauth.

@darrell_tw trying to use this in production prompts me with: “If your application’s configuration includes more than 10 domains, a logo, or requests access to sensitive or restricted scopes, you must submit the application for verification.”

And “The application must be verified. Submit the application for verification once you have finished entering your information.”

I didnt do anything special but added the standard google products (gmail, drive, etc.)

Trying to change it to Intern hands me: “Since you are not a Google Workspace user, you can only make the application available to external users (general public).”

That’s fine for the prompts

If you are using this oauth alone. You can still use the oauth on your own. The verification will be required if you want to get other google user’s oauth token.

1 Like

@darrell_tw

So the way I have it right now it should work endlressly if my account (the same as the owner of the gcp related account) is the only one that accesses it?

1 Like

Yes. I as using this solution for several months and looks fine

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.