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.
There have been a lot of changes to google auth recently, and n8n has made some changes to address these, are you on latest version?
But it is also just a common bug for oauth to fail, due to internally not correctly refreshing the oauth token.
The annoying but recommended workaround is to handle the oauth flow manually, saving the auth and refresh token, and making a new refresh grant before making major requests. The refresh tokens usually live 30-90 days, where a auth token will only like 1-7.
Could you also show your cred setup (blurring/removing half of keys/PIIs)?
I mean this basically destroys the entire use case of these automations if I have to reconnect these modules.
Google Sheets Oauth with a different account seems to work. I don’t see a pattern here.
What do you mean seems to work? One doesnt one does?
And you can set the refresh and auth tokens into a sheet or db, and fetch and use them within the workflow, its an added step, but it doesn’t remove from the ability to create and use nodes on n8n. Although you would have to use manual http requests instead of the in built node.
Don’t really get where you are going with this I mean I need the Credentials to work indefinitely or at least longer than a week otherwise the automations are no automations
And I was talking about Google Sheets API which seems to now be connected for 3 weeks no problems.
But the Google Sheets API might be the only one which is getting called every day while the others arent called - thats the only major difference I could figure out.
@ThinkBot persists even with the latest version. Google Sheets doesnt seem to be a problem (at least I don’t realize) but GMAIL desynches like every 4 days