Skip to main content

HubSpot

The HubSpot connector writes to HubSpot CRM objects such as Contacts, Companies, Deals, etc.

Prerequisites

  • A HubSpot account.
  • For each target object type, the HubSpot properties you intend to populate must already exist. It is recommended to create a dedicated property group to organize them.
  • One property on each object type to use as the match property.

Match Property

HubSpot record IDs are assigned automatically and cannot be set by the connector. To match incoming documents to existing records, the connector searches HubSpot for records using a property value from the document.

Using a unique property as the match key is strongly recommended. Non-unique properties require a search to determine whether a record exists. Due to HubSpot search API limitations, using a non-unique match property can result in duplicate records.

You can search for existing unique properties in the HubSpot webapp: Settings / Data Management / Properties and check if the property rules require unique values.

Alternatively, look at the object definition or use the Properties API to list items with hasUniqueValue set to true.

Property name mapping

Collection field names are mapped to HubSpot property names automatically: leading symbols and numbers are removed, uppercase letters are lowercased, and any character that is not a lowercase letter, digit, or underscore is replaced with _. Names are truncated to 100 characters.

Deletions

Hard deletes are not supported. To track deletions, ensure your collection documents include the /_meta/op field and create a corresponding meta_op property in HubSpot.

Backfills do not remove existing HubSpot records.

Enumerations

HubSpot enumeration properties require values from a pre-defined set. If a document field contains a value not in the allowed set, the materialization will return an error like:

HOWDY was not one of the allowed options: [IN_PROGRESS, NEW, UNQUALIFIED, ...]

Ensure your collection data (or a derivation that shapes it) only produces values valid for enumeration properties.

Configuration

You can configure connectors either in the Estuary web app or by directly editing the Data Flow specification file. See connectors to learn more.

Properties

Endpoint

PropertyTitleDescriptionTypeRequired/Default
/credentialsAuthenticationCredentials for authenticating with HubSpot.CredentialsRequired
/advanced/limitRequest LimitMaximum API requests per second (excluding search).number10
/advanced/burstRequest Burst CountBurst request allowance (excluding search).integer100
/advanced/search_limitSearch Request LimitMaximum search API requests per second.number5
/advanced/search_burstSearch Request Burst CountBurst search request allowance.integer5

Credentials

For production tasks, use the OAuth2 authentication method.

PropertyTitleDescriptionTypeRequired/Default
/credentials/auth_typeAuth TypeAuthentication method.stringRequired: OAuth2
/credentials/refresh_tokenRefresh TokenOAuth2 refresh token. Managed automatically by the Estuary web app.stringRequired
PropertyTitleDescriptionTypeRequired/Default
/credentials/auth_typeAuth TypeAuthentication method.stringRequired: ServiceKey
/credentials/service_keyService KeyHubSpot private app access token with the required scope grants.stringRequired

Bindings

PropertyTitleDescriptionTypeRequired/Default
/objectObject typeThe HubSpot CRM object type to materialize into.CRM ObjectRequired
/delta_updatesDelta UpdateAlways true — this connector uses delta updates.booleantrue (read-only)

CRM Objects

  • Calls
  • Companies
  • Contacts
  • Deals
  • Emails
  • Line Items
  • Meetings
  • Postal Mail
  • Products
  • Quotes
  • Tasks
  • Tickets

Sample

materializations:
${PREFIX}/${MATERIALIZATION_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/materialize-hubspot:v1
config:
credentials:
auth_type: OAuth2
refresh_token: <secret>
bindings:
- source: ${PREFIX}/contacts
resource:
object: Contacts
- source: ${PREFIX}/companies
resource:
object: Companies