N8n Cloud Google Drive OAuth2 failing: redirect_uri_mismatch (Gmail + Workspace)

Describe the problem/error/question
Google Drive OAuth2 credential connection is failing on n8n Cloud across multiple Google accounts. This is affecting:
• my personal Gmail account (existing automations)
• my Google Workspace account
• a second Workspace account I tested
None of them will connect now. This used to work previously. I’ve spoken to a Google professional who reviewed my Google Cloud setup and confirmed everything is configured correctly.
What is the error message (if any)?
I see two recurring failure modes:
1. Google error page:
• Error 400: redirect_uri_mismatch
Request details show redirect URI like:
• https://.app.n8n.cloud/rest/oauth2-credential/callback
2. In other attempts I get through Google account selection + consent, Google redirects back with code=… to:
• https://.app.n8n.cloud/rest/oauth2-credential/callback?..&code=…
…but then n8n shows an OAuth callback error page with:
• {“error”:“redirect_uri_mismatch”,“error_description”:“Bad Request”}
I also intermittently saw:
• Error 401: invalid_client when restarting from scratch, but the main blocker is redirect URI mismatch.
Please share your workflow
This issue occurs at the Google Drive OAuth2 credential connection step (before any workflow runs). It is not node/workflow specific.
Share the output returned by the last node
No workflow output, because the credential cannot connect. The only output I can share is the OAuth callback JSON shown by n8n:
• {“error”:“redirect_uri_mismatch”,“error_description”:“Bad Request”}
What I’ve tried already
• Followed n8n docs and Google Cloud setup docs step-by-step multiple times
• Verified Drive API enabled, consent screen configured correctly, test users added
• Tried both Testing and Publishing to Production (not just testing)
• Created multiple brand-new OAuth clients (Web application) and recreated the n8n credential repeatedly
• Tried Incognito/private windows, cache resets, revoked Google third-party access and retried
• Tried multiple accounts (Gmail + multiple Workspace accounts) with same results
• Notable detail: n8n credential UI sometimes shows an OAuth Redirect URL like https://oauth.n8n.cloud/…, but Google request details often show redirect_uri = my instance callback …/rest/oauth2-credential/callback
Information on your n8n setup
• Running n8n via: n8n Cloud
• Operating system: macOS + Chrome
• n8n versions tested:
• 2.2.x latest beta (issue occurred here first)
• downgraded to 2.1.2 stable and the issue persists with the same behavior
Question / What I need help with
Because this is failing across multiple accounts and even after rebuilding Google Cloud OAuth clients and publishing vs testing, it looks like a possible n8n Cloud OAuth redirect/token exchange mismatch (authorize uses one redirect_uri, token exchange uses another). Can someone confirm what redirect URI n8n Cloud uses for Google Drive OAuth during the authorize step and during the token exchange, and whether there were recent changes affecting Drive OAuth on Cloud? Any known fix or workaround short of service accounts?

3 Likes

Man i have the exact same problem, it seems that i’ve tried everything multiple times and it still not working, it may be an issue from n8n?

2 Likes

im thinking of just deleting my account because i cant use it without being able to access google workspace. I havent come across a real solution either it sucks

2 Likes

Does anybody knows when n8n will fix this….? Having the same issue and got a queue of angry Clients……

2 Likes

same here its driving me insane

2 Likes

Getting crazy here, I just spent 5 hours on that issue and tried all type of solutions. If anyone finds a solution please share !! Thank you

2 Likes

Same issue happening with me also : “Error 400: redirect_uri_mismatch” i tried every way to solve this issue, but it didn’t work at all. If anyone from the community finds the answer, please share it here.

1 Like

Hey guys, I found a workaround to this OAuth 2 issue.

Instead of using the OAuth 2 method, I went and used the Service Account method and it works for me now. Here are the steps I followed:

Step 1: Create a Service Account in Google Cloud

  1. Go to Google Cloud Console

  2. Navigate to IAM & AdminService Accounts

  3. Click + CREATE SERVICE ACCOUNT

  4. Give it a name (e.g., “n8n-sheets-access”)

  5. Click CREATE AND CONTINUE

  6. Skip the optional steps and click DONE

Step 2: Create and Download the Key

  1. Click on the service account you just created

  2. Go to the KEYS tab

  3. Click ADD KEYCreate new key

  4. Choose JSON format

  5. Click CREATE - this downloads a JSON file

Step 3: Share Your Google Sheet with the Service Account

  1. Open the downloaded JSON file

  2. Find the client_email field (looks like: [email protected])

  3. Copy that email address

  4. Open your Google Sheet

  5. Click Share button

  6. Paste the service account email

  7. Give it Editor access

  8. Click Send

Step 4: Configure n8n with Service Account

  1. In your Google Sheets node, change Authentication from “OAuth2” to “Service Account

  2. You’ll see a field for Service Account Email and Private Key

  3. From the JSON file you downloaded:

    • Copy the client_email value → paste into Service Account Email

    • Copy the entire private_key value (including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----) → paste into Private Key

  4. Save the credential

This completely bypasses the OAuth flow and should work immediately. But this is specifically for my case of linking Google Sheets, but I believe it should also work for the other Google Services.

I got this problem today too.
Been trying to use both:

  1. Default n8n oath redirect url and
  2. The url that is displayed in the error log from the 1 method

Both returns error redirect_uri_mismatch

2 Likes

it doesn’t have create access, need business gmail account.

I can confirm this is an n8n issue for sure nothing to do with google. My solution was to cancel my cloud account and self host. Works now. I cant have this kind of error pop up and stop my workflows for my business

3 Likes

Guys n8n just fix that in 2.1.4, upgrade to that. Mine is solved.

1 Like

n8n fixed the problem please upgrade the version with 2.1.4

2 Likes

@mielye_mitchell when Cloudflare was down for more than than n8n …. I didn’t see you here complaining and trying to instigate that you deleted n8n and blabbering about your “customers”.

Now that is fixed, not a thanks or anything?

Im sorry you took my messages that way. If you look through my messages including my first post i told everyone my exact issues and all steps i took. I didnt just delete n8n i love the platform i just canceled my subscription from cloud and went to self hosted like many users. As far as cloudflare i wasnt even on the forum during that time. I was referred here for this issue from my skool community. As to customers i dont see how its blabbering when they rely on the automations. I simply needed a solution which i found through self hosting which i said.

Hello, I have this issue and it’s killing me. I’m using n8n cloud, how can I upgrade ?

Hello, I’m using n8n cloud and it says that it’s still on version 2.1.2, how can I upgrade to 2.1.4 ? This issue is killing me

Hey arthur go to settings and your admin panel and go to manage and you can upgrade to the latest

I can confirm it. I was seeing the issue with 2.1.2. It works now after upgrading to 2.1.4. It’s “admin panel” → “dashboard” → “gear icon” →

Then “save changes”. It should then bounce the instance. Head to your instance and it should now work– well it does for me now.

Khem

1 Like

Hi, I am using the latest stable version (2.1.4) and still facing the same issue. Is someone in the same situation?

1 Like