Hubspot Integration

Hubspot is a marketing automation platform that also provides a CRM. Revenue teams can store their contextual data on customer interactions in Hubspot, as well as build marketing campaigns. However, this contextual data is hard to analyze alongside product usage metrics that live in other systems. Correlated makes it easy to combine your customer data in Hubspot with other data sources so that you can view how your customers are doing on a company basis.

Before You Get Started

Your permissions in Hubspot will impact what data you can access in Correlated When we use your account to connect to Hubspot, we will only be able to see the data that you are allowed to see. As a result, we would suggest connecting to Hubspot using an account that has admin privileges.

Getting Started

  1. Log into the Correlated application
  2. Click on Integrations in the left navigation
  3. Edit your Hubspot integration
  4. Click "Connect to Hubspot" - you will be redirected to Hubspot to authenticate and authorize our application

Configuring your Integration

Once you've connected Hubspot, you'll want to tell Correlated what fields matter to you. This is important as you only want to surface fields that you think are valuable to the team using Correlated.

  1. Click on Integrations in the left navigation
  2. "Edit" the Hubspot Integration
  1. Select the "Configuration" tab
  1. In order to help Correlated map your Salesforce objects to the right Accounts and Users, you'll need to give us your Account ID and User ID fields. Note: These IDs must be consistent with the IDs you use in other data sources connected to Correlated.
  2. Click "Connect Companies" and select the proper Account ID field.
  3. Click "Connect Contacts" and select the proper User ID field. You'll be prompted to add the Account ID here as well, but this step is optional.

Importing Fields from Hubspot

  1. Now that you've configured Hubspot properly, click "Add Fields" to import the fields you want to access in Correlated.
  1. When you select fields to bring over, these will become available as Dimensions in Correlated, and can be used to build Playbooks, customize Account/User Lists, or power PQL Scoring Models.
  2. When you're done selecting fields, click "Save."


You must have unique product IDs in Hubspot to use Correlated

Correlated requires that you have unique identifiers for Contacts and Companies in Hubspot that match the identifiers you use to track product usage (or any other data exposed to Correlated).

Syncing product IDs to Hubspot

If you have a data warehouse that stores user IDs and account (or group/workspace) IDs, you must write those IDs back into Hubspot. Our recommendation is to use Reverse ETL tools like Hightouch or Census to accomplish this.

If you are using just Segment to pipe product data into Hubspot, we recommend that you use Segment's own integration with Hubspot to tag users and companies with IDs.

First, log into Segment and add the Hubspot Destination. Follow the prompts to get things connected. Do not turn the Hubspot Destination on yet, as we want to do some further setup before you do so.

Now, go to your Sources and click into the Source that you want to connect to Hubspot. This would be the source that contains your product data - typically your web app. You'll notice the "Debugger" option on the top nav. Go ahead and click that.

Now, you'll want to investigate whether or not your data is being sent to Segment in a way that Hubspot can utilize it. Let's start first with hooking up your Contacts in Hubspot with user IDs.

Typically, user IDs are sent in "Identify" calls. In the "Advanced" filter, filter for just your Identify calls. Click into an Identify call and view the payload on the right hand side of the screen.

You'll see something like this code snippet below, with different values. In the "traits" section, check if you are passing in your userId as a trait. Segment to Hubspot only accepts names with lowercase, so make sure to name your trait correctly.

  "messageId": "segment-test-message-exyqhj",
  "timestamp": "2022-03-22T21:13:12.834Z",
  "type": "identify",
  "email": "[email protected]",
  "projectId": "testtesttest",
  "traits": {
    "userid": "test-user-zo4bvp",
    "trait2": "test",
    "trait3": true
  "userId": "test-user-zo4bvp"

If you see a trait named appropriately already with your user ID (essentially, the trait must be completely lowercase), you can go ahead onto the next step. If not, you'll have to ask your engineering team who owns Segment to "add the user ID as a trait" in the Identify call.

Now that you have your user ID in your "traits", you'll want to create a property in Hubspot so that Segment can fill that property with a user ID.

Click Setup, navigate to the Data Management section in the left nav bar, select Objects, and then select Contacts. Next, click "Manage Contact Properties."

Click "Create property" and for the label, put in the exact name your user ID trait has in Segment. Go ahead and finish creating the property.

Next, you'll want to tag all your Companies with their group ID. Again, you can view your Group calls and the traits embedded in them using the Segment Debugger. Your Group calls must contain a website trait so that Segment can find the right Company in Hubspot.{
  groupId: "some_group_id",
  userId: "some_user_id",
  traits: {
    website: "",
    name: "Example Inc.",
    groupid: "some_group_id"

Like with users, you will want to go in to Hubspot and add a property on the Company object, giving it a label that is equal to the group ID's trait name.

Now, Segment should be able to tag Contacts and Companies with the right user ID and group ID, and you'll be able to join Hubspot data with Segment data.

For more information on how this works, the Segment documentation is very helpful.


Your account must have the following authentication scopes granted to connect Hubspot with Correlated:

  • crm.import
  • crm.lists.write
  • crm.objects.companies.write
  • crm.objects.contacts.write
  • crm.objects.custom.write
  • integration-sync
  • oauth
  • timeline