Set up HubSpot

Set up HubSpot as a destination in RudderStack.

RudderStack supports sending event data to HubSpot via the following connection modes:

Connection ModeWebMobileServer
Device modeSupported--
Cloud modeSupportedSupportedSupported
In a web device mode integration, that is, using JavaScript SDK as a source, the HubSpot native SDK is loaded from domain. Based on your website’s content security policy, you might need to allowlist this domain to load the HubSpot SDK successfully.

Once you have confirmed that the source platform supports sending events to HubSpot, follow these steps:

  1. From your RudderStack dashboard, add the source. Then, from the list of destinations, select HubSpot.
  2. Assign a name to the destination and click Continue.

Connection settings

RudderStack supports sending data to HubSpot via the HubSpot’s legacy and new API.

As HubSpot’s legacy API will be deprecated soon, it is recommended to use the new API.

Legacy API

To successfully configure HubSpot as a destination using the legacy API:

  • Hub ID: Enter your HubSpot Hub ID. Refer to the HubSpot documentation for more information on obtaining your Hub ID.

  • Authorization Type: Select the authorization type from Private Apps or API Key, as explained below:

    1. Private Apps lets you use the HubSpot’s APIs to access specific data from your HubSpot account.
    HubSpot connection settings
    • Access Token: Enter your HubSpot access token from the Private Apps section in the HubSpot dashboard. Refer to the FAQ section for more information on getting the HubSpot access token.
    1. API Key (deprecating soon) lets you create custom applications using HubSpot’s APIs. Note that this authorization type will be deprecated soon. See the HubSpot documentation for more information.
    HubSpot connection settings
    • API Key: Enter your HubSpot API key. This is a required field to send data to HubSpot via cloud mode. For more information on obtaining the API key, refer to the HubSpot documentation.
  • API Version: Select Legacy API (v1) from the dropdown. To work with the new HubSpot API, refer to the New API section.

The below settings are applicable only if you want to send events to HubSpot via the web device mode:

  • Client-side Events Filtering: This setting lets you specify which events should be blocked or allowed to flow through to HubSpot. For more information on this setting, refer to the Client-side Events Filtering guide.
  • Use device mode to send events: Enable this setting to send events to HubSpot via device mode using the native JavaScript SDK.
  • OneTrust Cookie Categories: If Use device mode to send events is enabled, this setting lets you associate OneTrust cookie consent groups to HubSpot.


To successfully configure HubSpot as a destination using the new API, all above-mentioned settings (for the legacy API) are applicable except you need to select the New API (v3) in API Version dropdown:

HubSpot connection settings

Additional settings to configure HubSpot using the new API are as follows:

HubSpot connection settings
  • HubSpot property name to be used as lookup field: Enter a unique property to be used as a lookup field for the HubSpot contacts. The lookup field entered here must also be passed in the identify call’s traits as its value will be used to look up the contact. Refer to the identify call for more information.
If you are connecting the HubSpot destination to a Reverse ETL source, you can skip setting this field and pass N/A as the value.
  • Create associations between object records: Enable this setting to create associations between the object records while using a Reverse ETL source. Refer to the Creating associations between object records section for more information.

The below settings are only applicable for the Private Apps authorization type:

  • RudderStack Event Name: Enter the RudderStack event name you want to map to the custom behavioral event created in HubSpot.
  • HubSpot Event Name: Enter the tracking ID of the HubSpot custom behavioral event you want to map to the above-mentioned RudderStack event.
  • Map your Event Property: Although HubSpot provides some default properties with custom behavioral events, you can create additional custom properties and map them to the RudderStack properties using this field. You can also specify multiple properties for a single event. Refer to the Custom behavioral events section for more information.


Where do I get the Access Token for HubSpot?

To get the HubSpot access token, follow these steps:

  1. Log into your HubSpot account.
  2. Go to Integrations > Private Apps from the left sidebar.
  3. Click your app to get the access token:

Questions? Contact us by email or on Slack