n8n · Gmail and Gmail Trigger nodes

401 unauthorized error (Gmail)

Short answer

This n8n Gmail error occurs when there is an issue with the credential you are using and its scopes or permissions. For OAuth2 credentials, make sure you've enabled the Gmail API in APIs & Services > Library.

VerifiedLast verified

01Error text

n8n error
401 - {"error":"unauthorized_client","error_description":"Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."}

02Likely causes

  • There is an issue with the credential you're using and its scopes or permissions.

03How to fix it

  1. For OAuth2 credentials, make sure you've enabled the Gmail API in APIs & Services > Library.
  2. For Service Account credentials, enable domain-wide delegation, and make sure you add the Gmail API as part of the domain-wide delegation configuration.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for n8n work:Open n8n jobsn8n rates and salaries

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.