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
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
- For OAuth2 credentials, make sure you've enabled the Gmail API in APIs & Services > Library.
- 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
→Related errors
- Forbidden - perhaps check your credentials (Gmail)This n8n Gmail error displays next to certain dropdowns in the node, such as Label Names or IDs. Turn on Impersonate a User in the Google Service Account credential.
- Bad request - please check your parameters (Gmail)This n8n Gmail error most often occurs if you enter a Message ID, Thread ID or Label ID that does not exist. Try a Get operation with the ID to confirm it exists.
- Column names were updated after the node's setupThis n8n Google Sheets error means the column names in the sheet have changed since you set up the node. Re-select Mapping Column Mode to make the node fetch the column names again.
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