HubSpot is an inbound marketing and sales software that helps companies attract visitors, convert leads, and close customers.
|Data Blocking||check||Table level|
|dbt Package||check||Get the package: source / transform|
NOTE: We do not currently support syncing custom objects from HubSpot.
IMPORTANT: The HubSpot connector doesn’t support switching modes because we fetch history data directly from the APIs. We maintain two separate tables, one for live mode and one for history mode. For example, on the connector’s Schema tab, you will have two tables,
COMPANY_PROPERTY_HISTORY. You can sync the history table only if you have included the live table in your syncs.
Follow our step-by-step HubSpot setup guide to connect HubSpot with your destination using Fivetran connectors.
Marketing Hub schemalink
This schema is applicable for the HubSpot Marketing Hub product.
CRM and Sales Hub schemalink
This schema is applicable for the HubSpot CRM and Sales Hub products.
Service Hub schemalink
This schema is applicable for the HubSpot Service Hub product.
The HubSpot API doesn’t make deleted records available so Fivetran can’t mark deleted records in the destination. In your destination tables, deleted records will remain marked
false where the
_fivetran_deleted columns exist.
We use different strategies to capture deletes because the HubSpot API doesn’t offer a mechanism to capture deletes:
Infer deletes for the following tables:
We compare the tables against their previous version and capture deletes using the
Use webhooks to capture deletes for the
NOTE: If you created the connector using our REST API, we don’t capture deletes for the
DEALtables, because these connectors are not authorized using the Fivetran Hubspot application.
In HubSpot, you can merge two records into one record. For example, when you merge two contacts, the primary contact record remains after the merge and the secondary contact is merged into the primary record. For more information, see HubSpot’s documentation.
We capture merges for the
To capture merges of the
CONTACTtable, we use a separate table,
NOTE: You can also use our dbt package to delete your merged contacts. Delete merged contacts using
hubspot_contact_merge_audit_enabled: TRUE. The dbt package enables you to audit your merge contacts and removes any merged record from the
To capture merges of the
DEALtable, we add an
is_mergedcolumn in your destination table. We mark the deals that have been merged into another deal and no longer exist, as
is_merged = TRUE.
NOTE: In your destination table, you may observe the missing
To capture merges of the
COMPANYtable, we mark the company records as
is_deleted = TRUE.
If during a sync, we find that there are more than 10,000 updated records for the following endpoints, we re-import the associated source tables in full to capture all the changes:
For the above endpoints, we can either:
- retrieve the most recent 10,000 changes to the entities, or
- retrieve the entire dataset from an endpoint
Sync strategy for ENGAGEMENT tableslink
We do incremental syncs of the
ENGAGEMENT_* tables according to the sync frequency you set in your Fivetran dashboard. We also do a full re-sync of these tables once a day because we noticed incomplete data when we performed incremental syncs alone.
Sync strategy for EMAIL EVENT tableslink
Once a day, we fetch data for the last 25 hours for all
EMAIL_EVENT_* tables. We do this to capture events that might have been missed in the last sync because of HubSpot’s event processing delays.
HubSpot Developer Preview APIlink
We maintain the following tables using the HubSpot developer preview API, so there are sometimes structural changes in these tables. Fivetran automatically handles structural changes, which might lead to some schema breaking changes. If that happens, we need to re-sync the affected tables. You can read more in the HubSpot Developer Preview API documentation.
Negative timestamps from HubSpotlink
We automatically convert negative timestamps received from HubSpot to EPOCH, for example, 1st January 1970 00:00:00 UTC.
Deal stage calculationslink
The HubSpot API returns only the
date_entered value of the
dealstage properties data. We sync this data to the
Fivetran populates the
date_entered value in the
_fivetran_start column and sets the
date_exited value in the
_fivetran_end column. The
date_exited value for a deal stage is the
date_entered value of the next deal stage in chronological order.
You can calculate the
time_in value as the difference between the
_fivetran_end column values in the
For example, in the
deal_id10 in deal stage 145:
time_in_145= 1 hour (
deal_id10 in deal stage 173:
time_in_173= MAX_TIMESTAMP_VALUE - 14:00 (
HubSpot Tickets API limitationslink
HubSpot’s Tickets API endpoint returns a list of changes to the ticket objects. HubSpot limits the returned changes to the last 24 hours. To ensure data integrity, Fivetran triggers a re-sync of the
TICKET table if the incremental endpoint isn’t called in the last 24 hours.