Step-by-step guide to send event data from RudderStack to HubSpot

HubSpot is a leading marketing and sales platform that helps you track leads, as well as inbound marketing and sales. It offers state-of-the-art tools for efficient marketing, tracking sales and offering better customer support.

RudderStack supports HubSpot as a destination to send your event data through our APIs.

Getting Started

Before configuring your source and destination in RudderStack, please check whether the platform you are working on is supported by HubSpot. Refer the table below:

Connection Mode




Device mode




Cloud mode




Once you have confirmed that the platform supports sending events to HubSpot, perform the steps below:

Please follow our guide on How to Add a Source and Destination in RudderStack to add a source and destination in RudderStack.

  • Give a name to the destination and click on Next. You should then see the following screen:

Connection Settings for HubSpot in RudderStack
  • Provide your HubSpot API key and Hub ID in the required fields. Please find API Key and Hub ID in your Hubspot Account.

API Key is mandatory if you need to send data to Hubspot using cloud-mode

  • Provide your preference to flow the data to HubSpot through native SDK or through the RudderStack backend. Click on Next to finish the configuration.

The setting to enable / disable native SDK to send events can be changed later. However, for that to reflect in your website, you will need to refresh the web page.


To send the data to HubSpot, an initial page call is required. For more information on the page call, please refer to our RudderStack API Specification documentation.

We support the page call only in our JavaScript SDK.

The following snippet is an example of a page call:;


The identify call is used to create or update a contact in HubSpot. To send data through our JavaScript SDK, you need to call either page or track after that.

You need to provide an email id of that user under the traits of the identify call.

If you want to send the data through our RudderStack backend, you don't need the additional page or track call to create or update a contact in HubSpot.

Here is an example identify call:

firstname: "Tintin",
city: "Brussels",
country: "Belgium",
phone: "1234567890",
email: "",
Test_prop: "abcdef",
test_date: 1574769933368,
test_date1: new Date("2019-10-14T11:15:53.296Z")

Special fields

HubSpot supports the following traits as special fields:

  • address

  • city

  • companyName

  • email

  • firstName

  • lastName

  • position

  • phone

  • zip

Custom properties

Hubspot also supports custom properties. You can update values of the contact property that you have created in HubSpot.

  • Note that when you provide any custom property, it automatically converts to lower case and any space will be replaced with an underscore. HubSpot does not accept properties in upper case and spaces.

  • HubSpot discards any property which doesn't exists and returns 400 Bad Request.

For sending properties of type date send the date as the epoch time, or as a date object. We convert it to the required HubSpot format (midnight UTC).


A track call is used to record any action the user performs. For more information on the track call, refer to our RudderStack API Specification guide.

To associate a track call with a user, you need to specify the user's email under traits under context . Moreover, we associates the track events post an identify request with the same contact.

The following code snippet shows a sample track event:

value: 30
context: {
ip: "",
traits: {
firstname: "Tintin",
city: "Brussels",
country: "Belgium",
phone: "1234567890",
email: ""
anonymousId: "00000000000000000000000000"

You can update your contacts using a track call as well. As shown in the above example, if you provide the relevant contact information in traits under contextwith the email mentioned as well, HubSpot will create or update that contact.


The screen call records the screen views of the user in your App. If you have turned on the screen views in your App implementation from the iOS or Android SDK it will register in your dashboard. We forward the properties you've passed along with the screen call as it is.

Here is a sample screen call in using RudderStack iOS SDK:

[[RSClient sharedInstance] screen:@"Main"
properties:@{@"prop_key" : @"prop_value"}];


Where do I get the API Key and Hub ID for Hubspot?

You can get the API Key and Hub ID for Hubspot by logging into your Hubspot account.

Please refer to the following documentations offered by Hubspot for more details:

Contact Us

If you come across any issues while configuring HubSpot with RudderStack, please feel free to contact us or start a conversation on our Discord channel. We will be happy to help you.