Google Sheets OAuth2 API credential got “Something went wrong"

Describe the problem/error/question

I’m trying to setup a new credentials with Google OAuth2, each time I tryh to login I got a message “Google Sheets OAuth2 API credential “Something went wrong”

On some threads, people who got this error with n8n v2.x solved the issue by upgrading to 2.1.4

I upgraded to 2.1.4 on my self-hosted instance, but I still got the issue. No log entries on the specific error, so it’s hard to point out the root cause

What is the error message (if any)?

Something went wrong. Please try again! 

Information on your n8n setup

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

The most common problem is probably that in google cloud, your redirect URI is wrong. Ensure that the google sheets API is also enabled.

Also, how are you assessing N8N in the browser? Are you doing it through localhost, or are you forwarding it by port forwarding through your router?

I’m pretty sure my google oauth2 setup is correct : it works well when I was running n8n v1.x

The google sheets credendials that I previously setup when on n9n v1 is still running well, but I cannot setup additionnal google spreadsheets credential since I upgrade n8n to v2

It must have something to do with the version overhaul, I’m not exactly sure why. Maybe try setting up a whole new one for V2?

I did… I created a new project and recreated everything from scratch ; same error

I would try authenticating one more time, and if that still fails maybe switch to a service account. When it errors, there is also a screen in the n8n node called more details, can you paste that in your reply

I got it from another persons post so I removed it.

thanks for the recommandation

I tried with another google account, still the same error ; I’m pretty sure the issue is located somewhere in my n8n self-hosted instance, but without explicit error message or error log, it’s hard to troubleshoot

For the service account, I tried but unfortunately the usage of service account is not possible with “google sheets trigger”.

I can still use my pre-existing google sheet credentials which works well, legacy of the n8n v1 before upgrade. I created a workaround by looking every 30 min on a specific value in a specific cell to track an update, but it’s less conveninent than the “on row update” trigger

Any clues about where to find out logs, errors, etc. ?

I use cloud and self-host. When it errors, if you click on the node you can see a more details which will show more details. You can also find it somewhere in the files where your hosting it, but im not fully sure where. If you look in the folder where your hosted n8n is, perhaps it would be in one of those files, I’ll try to look where you can find it on the filesystem for you though.

there’s no log when signing on credential setup

I took a look at *.log files in the working dir, no relevant messages

I just retried with my laptop at work (windows + firefox) and it works…

I’ll make a new try later with my personal configuration (linux + firefox) to see if my config is the root cause or not

After many tries I finally find out the root cause. The faulty element is “ClearURLs” add-on with firefox ( ClearURLs ) which basically clean the URL from trackings elements present in the URL

1 Like

Nice that you fixed it!

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