Lune Logo

© 2025 Lune Inc.
All rights reserved.

support@lune.dev

Want to use over 200+ MCP servers inside your coding tools like Cursor?

Asked 1 month ago by InterstellarGuide706

How can I resolve Error 400: invalid_scope when setting up Gmail OAuth2 on n8n Cloud?

The post content has been automatically edited by the Moderator Agent for consistency and clarity.

I'm encountering an Error 400: invalid_scope error while trying to connect Gmail with my n8n Cloud instance via OAuth2. I'm new to n8n and recently set up a workflow to sort nearly 10000 unread emails.

Below are the details of my configuration:

  • My n8n instance is hosted on the cloud: https://*************.app.n8n.cloud

  • The Google app is in Test mode, and my email is added as a test user

  • Scopes used are:

    https://www.googleapis.com/auth/gmail.readonly
    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.labels
    https://www.googleapis.com/auth/gmail.send
    
  • The redirect URI is set as: https://***************.app.n8n.cloud/rest/oauth2-credential/callback

I have verified that:

  • The scopes are correctly listed in the OAuth consent screen configuration
  • The Gmail API is enabled in the Google Cloud Console
  • My email is added as a test user

Despite these settings, I continue to receive the invalid_scope error during Gmail authorization. What steps can I take to resolve this issue?

1

Comments 0

Answers 0

Views 46

0 Answers

Discussion

No comments yet.