Google Cloud Storage OAuth expires after 24h

Hello there,
As part of my workflow I have a Google Cloud Storage node that is supposed to store a file. The workflow works perfectly but the GCS node throws an authentication error ~24h after I authenticated. This means that I need to authenticate it every 24h otherwise my workflow fails.

Ideally I would like to set it up with a service account but unfortunately GCS doesn’t support service accounts for authentication.

Questions:

  • If OAuth is still the only option, is it possible to set it up once and never have to touch it again?
  • If I could get it to work with GCS it would ideal, any best practices?
  • What are the best file storage options for N8N? It doesn’t have to be GCS, I’m open to anything

This looks like an authentication expiry setup (maybe default by GCP) you can try increasing that from console or you can try any other storage depending upon the data type and pricing! I found cloudfare r2 to be a good one for majority of cases

Regards

I was having the same problem as the OAuth client had to be revalidated from time to time (even putting the GCP project into production). I solved this by using HTTP Request to Google Cloud in a Service Account.

Details that you should remember:

And that’s it :wink: