How to Restrict OAuth Scopes for Gmail in n8n to Only gmail.send

Hi everyone,

I’m currently going through Google OAuth app verification for my project, and I’ve run into an issue with the scopes that n8n seems to be requesting for the Gmail API.

Problem:

Even though I only need the following scopes:

  • https://www.googleapis.com/auth/gmail.send
  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/calendar.events

Google is detecting extra Gmail scopes on my OAuth consent screen such as:

  • gmail.readonly
  • gmail.modify
  • gmail.compose
  • gmail (full access)

These are not shown in my consent screen configuration in Google Cloud Console, so I believe they are coming from how n8n handles Gmail credentials behind the scenes.

What I Need Help With:

How can I force n8n to only request the gmail.send scope when using Gmail OAuth2 credentials?

  • Is there a way to manually define or limit the scopes in n8n Gmail credentials?
  • Do I need to create a custom credential instead of using the default Gmail OAuth2 one?
  • Or is there a workaround to stop n8n from requesting these broader scopes?

I’m trying to pass Google’s verification process, and they won’t approve the app unless it only uses the minimum necessary scopes.

Would appreciate any guidance or instructions. Thanks!

Did you find any solution as to that?