Learn more about HubSpot Export Integration.
HubSpot is an inbound marketing and sales platform that helps companies attract visitors, convert leads, and close deals. Using this integration to import HubSpot data in TD to eliminate the data silos, understand the customer behavior across all touchpoints, and create more relevant and timely interactions with customers, leading to better retention and loyalty.
Various HubSpot objects are supported in this integration, including Contacts, Companies, Contact Lists, Email events, Engagement activities, Deals, and other data objects.
- Basic knowledge of Treasure Data
- Basic knowledge of HubSpot
If your security policy requires IP whitelisting, you must add Treasure Data's IP addresses to your allowlist to ensure a successful connection.
Please find the complete list of static IP addresses, organized by region, at the following link:
https://api-docs.treasuredata.com/en/overview/ip-addresses-integrations-result-workers/
When you configure a data connection, you provide authentication to access the integration. In Treasure Data, you configure the authentication and specify the source information.
- Navigate to Integrations Hub > Catalog
- Search for and select HubSpot

- Select Create Authentication and provide the OAuth of a HubSpot account
- After being redirected back to the Integration Hub, repeat the above steps (this time your provided OAuth will be shown), enter a name for your authentication, and select Done
- Open TD Console
- Navigate to Integrations Hub > Authentications
- Locate your new authentication and select New Source
- On the first step
1 - Connection, type a source name in the Data Transfer Name field, and select Next
Identify what data to be ingested into Treasure Data using the parameters below, and select Next.

To support backward compatibility, this integration utilizes the API V1 for the data objects below:
- Contacts, with custom attributes
- Companies, with custom attributes
- Contact Lists
- Email events
- Engagement activities
- Deals, with custom attributes
The API V1 allows the incremental loading of Contacts, Companies, and Email events
- Start date: date from which to fetch data objects in HubSpot
- Number of days to fetch: Number of days to fetch. A maximum of the past 30 days can be fetched
Known limitations of the API V1:
- Not all custom attributes are supported
- A data import has an upper limit of 10,000 records
The API V3
A newer API version, the API V3, is used to support more data objects and bypass the 10k recordslimitation
| Field | Description |
|---|---|
| Source |
|
Object Name | The data object name to be imported. (For a full list of supported data objects, see HubSpot.)
In the case of |
| Incremental Column | (For API v3 Search - Mandatory) The column is used for incremental loading and/or filtering. |
| Fetch All Properties | (For API v3 Search) When unchecked, only the default properties of the data object will be imported. |
| Incremental | (For API v3 Search) When checked, only the new data since the last execution will be imported. |
| Start Date Time End Date Time | (For API v3 Search) Data within Start - End time will be imported. These options are useful for initial data loading. |
Optionally, you can modify advanced data settings. Select Next to move to the next step.

- On the
4 Data Previewstep, select Generate Preview to see a sample of your data before running the import (optional). - Select Next to continue.

For data placement, select the target database and table where you want your data placed and indicate how often the import should run, then select Save or Save & Run Now.

- TD Toolbelt: install the latest version of the TD CLI tool: TD Toolbelt
- Authentication ID: follow the steps above to create an Authentication for this integration on the TD Console. Then the ID could be seen at the last portion of its URL on the Authentication screen.

- Create a YML configuration file, ex:
**load.yml**, referencing the created authentication in the `td_authentication_id' field. Refer to the below Parameter Reference and Example for more details - Preview the input data (optional) using the command:
$ td connector:preview load.yml - Trigger the data import using the command:
$ td connector:issue load.yml --database db-name --table table-name - Schedule the execution using the command:
$ td connector:create daily\_import "10 0 \* \* \*" db-name table-name load.yml
The following table describes the parameters for configuring the HubSpot import integration via CLI.
| Name | Description | Value | Default value | Required |
|---|---|---|---|---|
td_authentication_id | Your authentication id, obtained in the UI | numeric | N/A | Yes |
target | Source. Enum of contacts, engagements, companies, deals, contact_lists, email_events, properties, search. | String | contacts | |
additional_properties | Additional Custom Properties. Only applicable in case target is contacts or companies or deals. | String | N/A | |
object_names | Comma separated object names for fetching object's properties. Only applicable when target is properties. | String | N/A | Yes if target is properties |
object_name | Object to be ingested when using search API v3. Only applicable in case target is search. | String | N/A | Yes if target is search |
incremental_column | Column used to do incremental loading when using search API v3. Only applicable in case target is search | String | N/A | |
fetch_all_properties | Decides whether or not to get all object's properties. This may add latency to the execution if checked but will provide more information. Only applicable in case target is search | Boolean | false | |
incremental | Whether or not to import new data from last run only. Only applicable in case target is contacts or companies or deals or email_events or search | Boolean | false | |
from_date | Start Date to ingest data (in ISO-8601 format). Only applicable when incremental is true and target is contacts or engagements or companies or deals or contact_lists or email_events. | Datetime | N/A | |
fetch_days | Number of days to fetch date from start date. Only applicable when incremental is true and target is contacts or engagements or companies or deals or contact_lists or email_events. | Number | 1 | |
start_time | Start time to ingest data (in ISO-8601 format). Only applicable in case target is search. | Datetime | N/A | |
end_time | End time to ingest data (in ISO-8601 format). Only applicable in case target is search. | Datetime | N/A |
in:
type: hubspot
td_authentication_id: 330392
additional_properties: "prop_1, prop_2, prop_3"
custom_properties_chunk_size: 100
retry_intial_wait_msec : "500" # initial waiting time as 0.5 second
retry_limit : "10"
max_retry_wait_msec : "90000" # maximum 1.5 minute of waiting time for each retry
from_date: 2016-09-01T00:00:00.000Z
fetch_days: 2
out:
mode: append- See Scheduling Using TD Toolbelt for periodic execution of this integration
- See Using TD Workflow with Integrations to trigger your created Source from a workflow