Hi @dubarseo, I’m sorry to hear you’re encountering this behaviour
I could reproduce this myself when selecting all scopes. My first (wild) guess would be that Hubspot has changed available scopes since the integration was created. n8n requests a scope which no longer seems to exist based on a quick search:
They documentation still mentions contacts though so I’m not 100% sure what’s causing the trouble. I’ll see if I can update the requested scopes on my end to make this work again and will report back.
I am not sure if these two scopes (or just one of them) are already sufficient, but I’ve blocked some time to take a closer look into this tomorrow. Thanks so much for reporting this bug @dubarseo and sorry for the trouble this causes. From looking at Hubspot’s documentation this error comes as a surprise at least to me
After testing this some more, I could get the Hubspot Trigger node with all options to work when using oauth, crm.objects.contacts.read, crm.schemas.contacts.read, crm.objects.companies.read, crm.objects.deals.read, crm.schemas.companies.read, crm.schemas.deals.read scopes and I’ve raised a PR for this:
What really bothers me is that contacts still appears in Hubspot’s documentation as an available scope (available to “Any account” and covering contact, companies and deals) but clearly is no longer available.
Was it just on your n8n Hubspot Trigger Node Credentials you were able to authenticate using those scopes? Or were you able to also authenticate on n8n Hubspot Oauth2 API Credentials?
I am creating a new app for our Hubspot to use n8n for Hubspot Triggers. I am trying to authenticate n8n credentials for Hubspot Oauth2 API and I am getting the ‘insufficient scopes provided’ error despite matching your scopes.
See below for screenshots. Note: I removed any data on the n8n Hubspot Oauth2 API screenshot given this is a public forum.
This is probably because this PR has not been merged. Hence, the Hubspot OAuth2 credentials are still using the old scopes. I’m working on a fix with @MutedJam, so hopefully, it will be available in the next release.
Hi @Lellis, I did not unfortunately. Does this happen when using the Hubspot Trigger node or when using the regular Hubspot node? When exactly does the error show up (were you authenticating when running into the error, where you trying to run a specific workflow etc.)?
Nop, it works since the update on my side (the connection) but the trigger still dont work.
So far it should be easier to use the Webhook’s exit in Worklows, if you have such option (me no, its cost something like 400$ per month to have such option…)
If your Hubspot account does not support the webhooks used by the Trigger node you would need to build your workflow around this limitation.
For example: If you want to run your workflow for new deals, you could use an Interval node to trigger your workflow every 15 minutes, then use the Get Recently Created operation of the Hubspot node to fetch deals created in the last 15 minutes. The interval can, of course, be adjusted if you need your data sooner.