LogoLogo
  • 🦩Overview
  • 💾Datasets
    • Overview
    • Core Concepts
      • Columns & Annotations
      • Type & Property Mappings
      • Relationships
    • Basic Datasets
      • dbt Integration
      • Sigma Integration
      • Looker Integration
    • SaaS Datasets
    • CSV Datasets
    • Streaming Datasets
    • Entity Resolution
    • AI Columns
      • AI Prompts Recipe Book
    • Enrichment Columns
      • Quick Start
      • HTTP Request Enrichments
    • Computed Columns
    • Version Control
  • 📫Syncs
    • Overview
    • Triggering & Scheduling
    • Retry Handling
    • Live Syncs
    • Audience Syncs
    • Observability
      • Current Sync Run Overview
      • Sync History
      • Sync Tracking
      • API Inspector
      • Sync Alerts
      • Observability Lake
      • Datadog Integration
      • Warehouse Writeback
      • Sync Lifecycle Webhooks
      • Sync Dry Runs
    • Structuring Data
      • Liquid Templates
      • Event Syncs
      • Arrays and Nested Objects
  • 👥Audience Hub
    • Overview
    • Creating Segments
      • Segment Priorities
      • Warehouse-Managed Audiences
    • Experiments and Analysis
      • Audience Match Rates
    • Activating Segments
    • Calculated Columns
    • Data Preparation
      • Profile Explorer
      • Exclusion Lists
  • 🧮Data Sources
    • Overview
    • Available Sources
      • Amazon Athena
      • Amazon Redshift
      • Amazon S3
      • Azure Synapse
      • ClickHouse
      • Confluent Cloud
      • Databricks
      • Elasticsearch
      • Kafka
      • Google AlloyDB
      • Google BigQuery
      • Google Cloud SQL for PostgreSQL
      • Google Pub/Sub
      • Google Sheets
      • Greenplum
      • HTTP Request
      • HubSpot
      • Materialize
      • Microsoft Fabric
      • MotherDuck
      • MySQL
      • PostgreSQL
      • Rockset
      • Salesforce
      • SingleStore
      • Snowflake
      • SQL Server
      • Trino
  • 🛫Destinations
    • Overview
    • Available Destinations
      • Accredible
      • ActiveCampaign
      • Adobe Target
      • Aha
      • Airship
      • Airtable
      • Algolia
      • Amazon Ads DSP (AMC)
      • Amazon DynamoDB
      • Amazon EventBridge
      • Amazon Pinpoint
      • Amazon Redshift
      • Amazon S3
      • Amplitude
      • Anaplan
      • Antavo
      • Appcues
      • Apollo
      • Asana
      • AskNicely
      • Attentive
      • Attio
      • Autopilot Journeys
      • Azure Blob Storage
      • Box
      • Bloomreach
      • Blackhawk
      • Braze
      • Brevo (formerly Sendinblue)
      • Campaign Monitor
      • Canny
      • Channable
      • Chargebee
      • Chargify
      • ChartMogul
      • ChatGPT Retrieval Plugin
      • Chattermill
      • ChurnZero
      • CJ Affiliate
      • CleverTap
      • ClickUp
      • Constant Contact
      • Courier
      • Criteo
      • Crowd.dev
      • Customer.io
      • Databricks
      • Delighted
      • Discord
      • Drift
      • Drip
      • Eagle Eye
      • Emarsys
      • Enterpret
      • Elasticsearch
      • Facebook Ads
      • Facebook Product Catalog
      • Freshdesk
      • Freshsales
      • Front
      • FullStory
      • Gainsight
      • GitHub
      • GitLab
      • Gladly
      • Google Ads
        • Customer Match Lists (Audiences)
        • Offline Conversions
      • Google AlloyDB
      • Google Analytics 4
      • Google BigQuery
      • Google Campaign Manager 360
      • Google Cloud Storage
      • Google Datastore
      • Google Display & Video 360
      • Google Drive
      • Google Search Ads 360
      • Google Sheets
      • Heap.io
      • Help Scout
      • HTTP Request
      • HubSpot
      • Impact
      • Insider
      • Insightly
      • Intercom
      • Iterable
      • Jira
      • Kafka
      • Kevel
      • Klaviyo
      • Kustomer
      • Labelbox
      • LaunchDarkly
      • LinkedIn
      • LiveIntent
      • Loops
      • Mailchimp
      • Mailchimp Transactional (Mandrill)
      • Mailgun
      • Marketo
      • Meilisearch
      • Microsoft Advertising
      • Microsoft Dynamics
      • Microsoft SQL Server
      • Microsoft Teams
      • Mixpanel
      • MoEngage
      • Mongo DB
      • mParticle
      • MySQL
      • NetSuite
      • Notion
      • OneSignal
      • Optimizely
      • Oracle Database
      • Oracle Eloqua
      • Oracle Fusion
      • Oracle Responsys
      • Orbit
      • Ortto
      • Outreach
      • Pardot
      • Partnerstack
      • Pendo
      • Pinterest
      • Pipedrive
      • Planhat
      • PostgreSQL
      • PostHog
      • Postscript
      • Productboard
      • Qualtrics
      • Radar
      • Reddit Ads
      • Rokt
      • RollWorks
      • Sailthru
      • Salesforce
      • Salesforce Commerce Cloud
      • Salesforce Marketing Cloud
      • Salesloft
      • Segment
      • SendGrid
      • Sense
      • SFTP
      • Shopify
      • Singular
      • Slack
      • Snapchat
      • Snowflake
      • Split
      • Sprig
      • Stripe
      • The Trade Desk
      • TikTok
      • Totango
      • Userflow
      • Userpilot
      • Vero Cloud
      • Vitally
      • Webhooks
      • Webflow
      • X Ads (formerly Twitter Ads)
      • Yahoo Ads (DSP)
      • Zendesk
      • Zoho CRM
      • Zuora
    • Custom & Partner Destinations
  • 📎Misc
    • Credits
    • Census Embedded
    • Data Storage
      • Census Store
        • Query Census Store from Snowflake
      • General Object Storage
      • Bring Your Own Bucket
        • Bring your own S3 Bucket
        • Bring your own GCS Bucket
        • Bring your own Azure Bucket
    • Developers
      • GitLink
      • Dataset API
      • Custom Destination API
      • Management API
    • Security & Privacy
      • Login & SSO Settings
      • Workspaces
      • Role-based Access Controls
      • Network Access Controls
      • SIEM Log Forwarding
      • Secure Storage of Customer Credentials
      • Digital Markets Act (DMA) Consent for Ad Platforms
    • Health and Usage Reporting
      • Workspace Homepage
      • Product Usage Dashboard
      • Observability Toolkit
      • Alerts
    • FAQs
Powered by GitBook
On this page
  • Getting Started
  • Connecting HubSpot
  • Supported Objects and Sync Behaviors
  • Contact Emails
  • Custom Objects
  • Custom Behavioral Events
  • Subscription Preferences
  • Managing Object Associations
  • Formatting Data for Hubspot Data Types
  • Delete Behaviour
  • Sync Speed
  • 🔑 Required Permissions
  • 🆘 Common Errors
  • Disconnecting HubSpot
  • Need help connecting to HubSpot?

Was this helpful?

  1. Destinations
  2. Available Destinations

HubSpot

This page describes how to use Census with HubSpot.

PreviousHTTP RequestNextImpact

Last updated 2 months ago

Was this helpful?

Getting Started

In this guide, we will show you how to connect HubSpot to Census.

Connecting HubSpot

  • Click the New Destination button.

  • Select HubSpot from the menu and click Connect.

Follow the OAuth flow to connect HubSpot. Easy!

Supported Objects and Sync Behaviors

Object Name

Supported?

Sync Keys

Behaviors

Company

✅

Object ID, Domain, and qualifying custom properties*

Update Only, Update or Create, Mirror

Contact

✅

Object ID, Email, and qualifying custom properties*

Update Only, Update or Create, Mirror, Delete

Contact & Static List

✅

Email

Update Only, Update or Create, Mirror

Deal

✅

Object ID, and qualifying custom properties*

Update Only, Update or Create, Mirror

Product

✅

Object ID, and qualifying custom properties*

Update Only, Update or Create, Mirror

Line Item

✅

Object ID, and qualifying custom properties*

Update Only, Update or Create, Mirror

Custom Object

✅

Object ID, any searchableProperty

Update Only, Update or Create, Mirror

Subscription Preferences

✅

Email

Mirror

Custom Behavioral Event

✅

Unique Event ID

Send

Email

✅

N/A

Send

Ticket

✅

Record ID

Send

Qualified Custom Properties for Sync Keys

In order to use a Custom Property as a Sync Key in Census, it must be one of the following types:

  • Single-line Text

  • Number

Unfortunately, this can only be done when the property is created in HubSpot. Depending on the volume and frequency of your HubSpot syncs, it may be worth re-creating the property in HubSpot to add the unique rule.

Contact Emails

Please note that an email address already associated with a Contact cannot be used for another Contact. If you attempt to update a Contact record with an email address that is already in use, the field will not be updated.

Custom Objects

Custom Objects are available to customers on HubSpot's Enterprise plans.

To ensure a Hubspot Custom Object property can be used as a Sync Key within Census the object must be updated to include the property as a searchableProperties.

Hubspot currently restricts users to updating this property via the Hubspot API.

This is not the same as configuring a property to 'Show in global search results' within the HubSpot UI

HubSpot offers some third party apps, available in their marketplace that can also assist with Custom Object management.

API How To

  • Perform a GET request to the /crm/v3/schemas endpoint. Then, search the response to identify the objectTypeId of the custom object you wish to update, as well as the name of the field you want to modify.

Here is an example request:

curl --location 'https://api.hubapi.com/crm/v3/schemas' \
--header 'Authorization: Bearer {YourPrivateToken}' \
--header 'Content-Type: application/json' \

The values will look something like this:

"objectTypeId": "2-41250440",
"name": "property_name_example",
  • Complete a PATCH request to the /crm/v3/schemas/{objectTypeId} endpoint. Ensure you use the objectTypeId you identified in the previous step and include the following request body:

{
  "searchableProperties": [
    "property_name_example"
  ]
}

Here is an example request with the objectTypeId as 2-41250440:

curl --location --request PATCH 'https://api.hubapi.com/crm/v3/schemas/2-41250440'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {YourPrivateToken}'
--data '{ "searchableProperties": [ "property_name_example" ] }'
  • Refresh the Object within a Census Sync, it should now display the new field in the Sync Key options.

Custom Behavioral Events

You'll need to both create the event AND add all of the custom properties beforehand. Once you've done so, copy and paste HubSpot's internal name for the object—you'll need to provide that to the Event Name property during the Census sync.

Hubspot also requires either the contact ID, email or utk of the contact associated with the event.

Note: The custom fields you've added will not show inside Census. You'll need to use the New Custom Field option to create the matching fields in Census. Make sure they're named exactly the same (names are case-sensitive).

Subscription Preferences

Subscription preferences allow you to manage which users are subscribed or unsubscribed from your existing marketing subscriptions (Currently, HubSpot does not allow external services to programmatically create new subscriptions).

HubSpot Subscription Preferences syncs require additional fields when using HubSpot's GDPR portal:

  • Legal Basis One of the following values: LEGITIMATE_INTEREST_PQL, LEGITIMATE_INTEREST_CLIENT, PERFORMANCE_OF_CONTRACT, CONSENT_WITH_NOTICE, NON_GDPR, PROCESS_AND_STORE, LEGITIMATE_INTEREST_OTHER.

  • Legal Basis Explanation A more detailed explanation to go with the legal basis.

The same value provided for these fields will be used for both subscribing and unsubscribing a user.

Census can only remove contacts from subscriptions that were originally created by Census.

Managing Object Associations

  • They're supported between all HubSpot object pairs, including Custom Objects.

  • They can represent one-to-many and many-to-many relationships.

  • Associations can be labeled or unlabeled. HubSpot Professional and Enterprise plans also support custom labels.

Many-to-many associations can be updated in Census syncs on either side of the associations, while one-to-many associations can only be set on the child or "many" side.

Labeled Associations

Labels in HubSpot can be complex. Census provides some advanced configurations to make updating and removing labels a bit more straightforward.

When creating a labeled association between two objects in HubSpot, HubSpot will also automatically create an unlabeled association. Additionally, when creating an association from a Contact to a Company, HubSpot will create another association labeled Primary. That means that adding a labeled association with a Census sync may actually create up to three associations.

Unfortunately, HubSpot does not offer a way to remove these default associations when they're no longer necessary after removing the labeled association Census created. These associations may have actually been created intentionally so Census also cannot delete them automatically.

To navigate this, Census provides an option to automatically clean up orphaned default associations when removing any associations.

When this behavior is enabled and a Census sync removes a labeled association, we'll also check to see if the remaining associations are only the unlabeled and Primary labeled associations. If so, we'll automatically remove those associations as well.

By default, this feature is not enabled to avoid accidentally deleting associations that were created outside the sync and should still exist.

Formatting Data for Hubspot Data Types

Object references (Associations): will be mapped to a Hubspot Array of Reference data type. The source data should be formatted in an array.

Example: ["RecordID_1", "RecordID_2"]

Multiple Checkboxes (Enumerated fields): will be mapped to a Hubspot Array of Enumeration. The source data should also be formatted as an array. Additionally, HubSpot expects the options provided to be the Internal Value as given by Hubspot's property settings page.

Example: ["InternalValue1", "InternalValue2", "InternalValue3"]

Delete Behaviour

In Mirror syncs, Census will perform a "soft delete" and archive records instead of permanently deleting them.

We also support HubSpot's "GDPR Delete", which is a permanent deletion. This sync behaviour is available on the Contact object: set the GDPR Delete endpoint toggle to TRUE.

Sync Speed

Your choice of sync key and behavior can have significant performance implications.

Using HubSpot Object IDs or Contact emails as identifiers in HubSpot is fast, but using all other fields as identifiers is very slow. That means any syncs that create new records in HubSpot (other than Contacts by email) will be slow. However, if a custom field is unique, it will significantly improve performance compared to non-unique custom fields. We're working with HubSpot to increase the speed of their APIs in order to improve sync speed.

Please be aware that Custom Objects require additional API calls and are even slower as a result (~1/3 the speed).

🔑 Required Permissions

Census requires that the connecting HubSpot user have Super Admin permissions in order to access all supported HubSpot objects.

🆘 Common Errors

There's a few errors which frequently cause skipped records on when syncing data to Hubspot.

  • TypeCastError: Empty input (after ) at line 1, column 1 [parse.c:1060] in 'InternalValue1;When syncing to a Multiple Checkbox (Enumerated) field, the source data should be formatted as an array instead of adding a semicolon between each value.

  • Multiple Contacts found with ID 123456When syncing associations, the Lookup By field should be unique. For example, if we have a Company sync with a contact association in the field mapping and the Lookup By field is a non-unique ID field, we will reject the Company record if we find multiple Contacts with that ID.

Need help connecting to HubSpot?

Within Census, navigate to the .

if you want Census to support more Hubspot objects and/or behaviors

Additionally, we strongly recommend this field be . Using a non-unique custom property will significantly degrade your sync speed.

The calls to make this update can be found in HubSpot's > Object Schema Tab > searchableProperties.

Retrieve (or create) to make API calls to Hubspot.

For additional support, please and we can walk you through it.

Custom Behavioral Events require a bit of prep work. You'll first need to go into HubSpot and create your event (see ).

HubSpot supports an advanced method of defining relationships between objects called . Associations have a number of different properties:

Census uses a variety of APIs to achieve the highest possible speed. With the right sync configuration (see below), Census can update 10,000 contacts per second. Census connects to HubSpot via OAuth, which is subject to a limit of 100 requests every 10 seconds (except for the Search API). For more information, see the .

Disconnecting HubSpot

If you need to disconnect HubSpot from Census for any reason, you can delete your connection from the Destinations page in Census and/or uninstall the Census app from your HubSpot account by following . Note that you won't be able to sync new data from Census until the connection is restored, but no previously synced data in HubSpot will be impacted.

via support@getcensus.com or start a conversation with us via the chat.

🛫
🔌
Destinations page
Contact us
marked as Unique
Custom Objects API Docs
a private app access token
contact the Census support team
HubSpot's instructions for how to do that
Associations
HubSpot documentation
these instructions
Contact us
in-app
Census Company/Contact Association
Hubspot Labeled Association
Census Labeled Association Sync Mapping