Unable to connect to Hubspot (oauth2) on community version

Describe the problem/error/question

I’m unsuccesfully trying to use the Hubspot node on the community (self-hosted) version of n8n. I’m using the oauth2 route for this with a custom app in Hubspot. To this end, I’ve followed the instructions provided here fully: HubSpot credentials | n8n Docs

There was a post on the Hubspot forum earlier about other people having the same issue, but with no resolve. https://community.hubspot.com/t5/APIs-Integrations/Having-trouble-connecting-to-n8n-self-hosted/m-p/948651

What is the error message (if any)?

During the oauth2 process (triggered in n8n in the Credentials section, where I add the client ID and client secret) I am prompted by Hubspot to choose my Hubspot environment, after that it returns:

"Couldn’t complete the connection
Authorization failed because the provided scopes are insufficient. Please contact the app developer."

I’ve already extended the scopes of the App in Hubspot to include every available scope, a total of 134. There are no other scopes I could possible give, yet the error seems to indicate that n8n still wants more scopes.

One thing I’ve observed is that on the Hubspot side, in the app configuration, it mentions an App Install URL where the oAuth2 scopes (as well as redirect uri) are embedded in that URL. That same page also shows an App ID (in addition to the Client ID and Client Secret). Within n8n’s credentials page, I’m only able to set a Client ID and Secret, not an App ID nor an App Install URL with scopes embedded. I wonder if n8n somehow is triggering an install URL (not directly visible to us in the front-end) that includes incorrect/deprecated/missing scopes. Again, I’ve given the app every possible scope Hubspot allows me to.

Please share your workflow

There is no workflow yet, this already fails in the Credentials section of n8n.

Share the output returned by the last node

Since this occurs in the credentials section, there is no output to show, other than the error from Hubspot’s oauth2 page above.

Information on your n8n setup

  • n8n version: 1.72
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

Hey @Quentin_Maes

Welcome to the community :raised_hands:

When it comes to Hubspot and the scopes you need to make sure you only select the ones we document if you select all of them or miss some it will cause issues.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.