Google OAuth2 gets disconnected automatically after a few days

Describe the problem/error/question

Hi,

I have many workflows that use Google OAuth2 credentials but I have a disconnecting issue. My Google OAuth2 credentials disconnect after a few days and my workflows fails. When I go to the credential, I see “Account connected” but despite this, it’s disconnected. I need to log in again and rerun my workflow and after it works.

How to prevent Google OAuth2 from disconnecting automatically? My app is in dev (not publishing), can it be the cause? I would like to know if someone else here is using a Google app in dev (testing) and don’t have those disconnection issues.

What is the error message (if any)?

None… Just the workflows that fail because Google credentials are no longer connected.

Please share your workflow

I have many but one is uploading files on Google Drive, another one is connecting to Google Search Console to extract data. All use Google OAuth2 and gets disconnected after a few days.

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Not sure?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (Cloudron)
  • Operating system: Ubuntu (Cloudron)

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Okay I don’t know how to close that thread but I found how my problem.

Consent screen in testing mode expired after 7 days. I wasn’t able to publish without verifications and it was for that reason I was still in testing mode.

The reason was that my app had sensitive scopes added to it (Gmail). So I removed it and have been able to push it to production to solve that 7 days credentials disconnection issue.

Hope this will help others…