How to configure webhooks in HubSpot
February 23, 2024
This guide walks you through how to configure webhooks in HubSpot to work with Unified.to. These webhooks allow you to get notifications about new events and changes from HubSpot e.g. new leads, updated deals, or deleted contacts.
Before you begin
- Make sure you have a HubSpot developer account.
- Get your client ID, client secret, and developer API key.
- Point the Redirect URL in your HubSpot app to
api.unified.to/oauth/code
- If you're using the EU data region, use instead
api-eu.unified.to/oauth/code
- If you're using the EU data region, use instead
- Follow our HubSpot developer guide to see how to do all of the above.
Set the target URL for webhooks in HubSpot
HubSpot uses a single webhook URL per app, which means you need to configure your app to send any events to the Unified.to servers.
- Navigate to your HubSpot developer account.
- Click Apps.
- Select the app you wish to use to access your customers' data.
- Click Webhooks.
- Under Target URL:
- If you are using the US data region, copy and paste in:
api.unified.to/webhook/workspace/hubspot
- If you using the EU data region, copy and paste in:
api-eu.unified.to/webhook/workspace/hubspot
If your URL is greyed out and you have subscriptions under Event subscriptions, then you'll need to unsubscribe from all of them. WARNING: If these subscriptions and the target URL are used by other applications, this action will break them. In that case, you may want to consider creating a new developer app to use with Unified.to. - If you are using the US data region, copy and paste in:
- You do not have to create any subscriptions manually. Unified.to will do that on your behalf.
Add scopes for your webhooks
In order for Unified.to to receive webhook data from HubSpot, you need to add scopes for the events you are interested in as well as a few others.
- With your app page still open, click Basic Info and then click Auth.
- Scroll down to Scopes:
- Add
crm.objects.owners.read
as Required. - For any events where you want to read data, add them as Required.
- Note: This applies to events that you'll be subscribed to as well as those that you will only call via the API. For example, if you want to create a Contacts webhook and also fetch Companies via the API, you'll need to add both
crm.objects.contacts.read
andcrm.objects.companies.read
as Required because Unified.to will pass all of these as required scopes in each auth flow.
- Note: This applies to events that you'll be subscribed to as well as those that you will only call via the API. For example, if you want to create a Contacts webhook and also fetch Companies via the API, you'll need to add both
- For any events where you want to write data, add them as Optional.
- For example, if you want to receive notifications about updates to HubSpot companies, you'll need to add
crm.objects.companies.read
as Required. If you want to write data to companies, addcrm.objects.companies.write
as Optional. - To see the full list of HubSpot scopes that Unified.to supports, see: https://app.unified.to/integrations/hubspot?tab=oauth2.
- Add
- The
oauth
scope is also required for all HubSpot integrations. This will be added by default if your app was created after April 2024.
Select permission scopes on Unified.to
When prompting your customers to authorize access to their third-party accounts, you will need to select the corresponding scopes in Unified.to as well. The following steps show you how to do that when using our Embedded Authorization component.
- On app.unified.to, click on Settings and then Embedded Authorization.
- You will see a preview of the Embedded Authorization component on the left and a list of configuration options on the right. Click on Options.
- Scroll down to Permission scopes and select webhook as well as any other permission scopes that you need e.g. the same scopes you added in HubSpot. You do not need to select
oauth
orcrm.objects.owners.read
on Unified.to as well will map these automatically on our end.- For example, using the examples from above for reading Contacts and Companies, the scopes in Unified.to would be
crm_contact_read
andcrm_company_read
- A mapping of Unified scopes to their HubSpot counterparts can be found here.
- Tip: Under Integration categories, select CRM to only see scopes related to CRM data objects.
- For example, using the examples from above for reading Contacts and Companies, the scopes in Unified.to would be