HubSpot CRM + CustomerLabs
HubSpot is an easy-to-use platform that helps companies capture new leads & convert them into paying customers, with marketing automation and CRM capabilities.
Marketing teams connect HubSpot with CustomerLabs 1PD Ops to send their Company, Contacts & Deals related information to create unified customer profiles in CustomerLabs 1PD Ops and sync the enriched customer data to all their favorite tools in their tech stack.
Rather than making an API call when an event happens in a connected account, HubSpot will send an HTTP request to CustomerLabs 1PD Ops via webhook. The below steps will help you integrate HubSpot as a Source with your CustomerLabs 1PD Ops account without writing any code.
Getting Started
Section titled “Getting Started”Step 1: Connect HubSpot
Section titled “Step 1: Connect HubSpot”- Log in to CustomerLabs
- Navigate to Sources → Connect Source
- Select HubSpot
Step 2: Authenticate HubSpot
Section titled “Step 2: Authenticate HubSpot”- Click Authenticate HubSpot
- Log in to your HubSpot account
- Select the account to connect
Step 3: Grant Permissions
Section titled “Step 3: Grant Permissions”- Allow access to:
- Contacts
- Companies
- Select the CustomerLabs account (if multiple)
Step 4: Configure Custom Fields
Section titled “Step 4: Configure Custom Fields”Standard fields are tracked automatically. Add custom fields under Custom Field Configurations.
Step 5: Creation of Hidden Fields & Placing the Tracking Script
Section titled “Step 5: Creation of Hidden Fields & Placing the Tracking Script”Create a hidden field in the form, as it is required for the tracking setup. Name the hidden field "cluid" and add the tracking code to pass the CustomerLabs user ID via query parameters. This will help with user profile unification.
HubSpot Webhook Subscriptions
Section titled “HubSpot Webhook Subscriptions”After integration, HubSpot sends default webhook events:
Object Types:
- Contacts
- Companies
- Deals
Event Types:
- Created
- Deleted
- Property Changed
- Deleted for Privacy
Key Event Triggers:
All workflows are typically based on property change events:
contact.propertyChangecompany.propertyChangecontact.creationdeal.propertyChange
Building Workflows in CustomerLabs 1PD Ops
Section titled “Building Workflows in CustomerLabs 1PD Ops”Terminology Mapping
Section titled “Terminology Mapping”| HubSpot | CustomerLabs |
|---|---|
| Contact | User |
| Company | Account |
Workflows help you:
- Filter incoming data
- Map attributes
- Build unified profiles
Workflow #1 – Send Data When a Contact is Created
Section titled “Workflow #1 – Send Data When a Contact is Created”This workflow captures contact data from HubSpot and maps it into CustomerLabs.
Step 1: Initialize Workflow
Section titled “Step 1: Initialize Workflow”- Provide a Workflow Name
- Create a test contact in HubSpot
- Click Choose Sample Data
Step 2: Fetch Sample Data
Section titled “Step 2: Fetch Sample Data”- Click Fetch New Data
- View event samples
Step 3: Understand Data Structure
Section titled “Step 3: Understand Data Structure”- Click View Details
- Observe JSON format
Step 4: Select Sample
Section titled “Step 4: Select Sample”- Choose a relevant sample
- Click Select this sample → Filter
Step 5: Apply Filters
Section titled “Step 5: Apply Filters”- Click Create Filter Criteria
- Set condition:
| Field | Value |
|---|---|
| Event Type | Contact.creation |
subscriptionType text contains contact.creation in the payload.
Step 6: Configure Event
Section titled “Step 6: Configure Event”Choose:
- Predefined event OR
- Custom event name
Step 7: User Identity Mapping
Section titled “Step 7: User Identity Mapping”Map identifiers:
identify_by_emailhubspot_user_id(Object ID)
Step 8: Attribute Mapping
Section titled “Step 8: Attribute Mapping”Map incoming data into:
- User Traits
- Event Properties
Contact Attributes Mapping
Section titled “Contact Attributes Mapping”Below are common properties sent from HubSpot:
| Property | Event | CustomerLabs Mapping |
|---|---|---|
| ext_id | contact.propertyChange | User External IDs |
| firstname | contact.propertyChange | User Traits |
| lastname | contact.propertyChange | User Traits |
| contact.propertyChange | User Traits | |
| phone | contact.propertyChange | User Traits |
| city | contact.propertyChange | User Traits |
| state | contact.propertyChange | User Traits |
| country | contact.propertyChange | User Traits |
| lifecyclestage | contact.propertyChange | User Traits |
| jobtitle | contact.propertyChange | User Traits |
Workflow #2 – Send Data When a Lead Stage is Created
Section titled “Workflow #2 – Send Data When a Lead Stage is Created”This workflow captures lead stages data from HubSpot and maps it into CustomerLabs.
Step 1: Initialize Workflow
Section titled “Step 1: Initialize Workflow”- Provide a Workflow Name
- Create a test contact in HubSpot
- Click Choose Sample Data
Step 2: Fetch Sample Data
Section titled “Step 2: Fetch Sample Data”- Click Fetch New Data
- View event samples
Step 3: Understand Data Structure
Section titled “Step 3: Understand Data Structure”- Click View Details
- Observe JSON format
Step 4: Select Sample
Section titled “Step 4: Select Sample”- Choose a relevant sample
- Click Select this sample → Filter
Step 5: Apply Filters
Section titled “Step 5: Apply Filters”- Click Create Filter Criteria
- Set condition:
HubSpot Payload Handling for Lead/Deal Stage
Section titled “HubSpot Payload Handling for Lead/Deal Stage”Internal Names in Payload: HubSpot will send internal field names in the payload. Example: lifecycle stage, deal stage, etc.
Dynamic Event Configuration: In the event configuration, we will use a dynamic event setup to capture all lead/deal stage info in one configuration, rather than configuring multiple events.
Handling Missing or Invalid IDs: Sometimes, the payload may contain internal lead/deal IDs instead of stage numbers. To avoid issues:
- We will map internal IDs to stage numbers.
- If a lead/deal stage ID is missing or not recognized, we will exclude it from processing.
Example Cases:
- Lifecycle stage does not contain:
157221111 - Lifecycle stage does not contain:
188423456
In these cases, the system will ignore the missing/invalid stage IDs.
Step 6: Configure Event
Section titled “Step 6: Configure Event”Choose event name as dynamic and map it with the lead stages to capture the lead/deal stages cycle.
Step 7: User Identity Mapping
Section titled “Step 7: User Identity Mapping”Map identifiers:
identify_by_emailhubspot_user_id(Object ID)
Step 8: Attribute Mapping
Section titled “Step 8: Attribute Mapping”Map incoming data into:
- User Traits
- Event Properties
Contact Attributes Mapping
Section titled “Contact Attributes Mapping”Below are common properties sent from HubSpot:
| Property | Event | CustomerLabs Mapping |
|---|---|---|
| ext_id | contact.propertyChange | User External IDs |
| firstname | contact.propertyChange | User Traits |
| lastname | contact.propertyChange | User Traits |
| contact.propertyChange | User Traits | |
| phone | contact.propertyChange | User Traits |
| city | contact.propertyChange | User Traits |
| state | contact.propertyChange | User Traits |
| country | contact.propertyChange | User Traits |
| lifecyclestage | contact.propertyChange | User Traits |
| jobtitle | contact.propertyChange | User Traits |