Gmail node setting up/ Error 400: redirect_uri_mismatch

Hello.

I am new member here and would be appreciate for your support.

Describe the issue/error/question

An errror occurs while I am trying to access to my Gmail account.

I am trying to create a workflow for learning purposes mentioned here: Try it out - n8n Documentation

I followed all the instructions mentioned here:
https://docs.n8n.io/quickstart/#build-your-first-workflow

What I’ve done in my Google Cloud:

  • setting up a consent screen for my first time of usage

  • created credentials and took sectet and ID

  • allowed Gmail API

What is the error message (if any)?

Authorization Error
Error 400: redirect_uri_mismatch

Невозможно выполнить вход в приложение, поскольку оно не отвечает правилам OAuth 2.0 Google.

Если вы его разработчик, зарегистрируйте URI перенаправления в Google Cloud Console.

Learn more
Request Details
The content in this section has been provided by the app developer. This content has not been reviewed or verified by Google.
If you’re the app developer, make sure that these request details comply with Google policies.

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

I am currently here…

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:
    My n8n runs on the desktop

Thank you in advance for your support. It’s my first practice here.

With best regards,
Dmitriy

Hi @dmalenik, welcome to the community!

The error you are seeing is coming from Google and it suggests the redirect URL used by n8n does not match the redirect URL you have configured in your Google Cloud Platform settings.

You probably want to head over to Google Cloud Platform, open the entry under OAuth 2.0 Client IDs you have created for your n8n instance and add the correct URL under Authorized redirect URIs:

image

1 Like

Hello,

Everything works!

Thank you!

1 Like

Awesome, glad to hear. Thanks so much for confirming!