Was this helpful?
HubSpot
HubSpot is a cloud-based, AI-driven CRM solution used for tracking details of business relationships. The HubSpot connector is implemented using HubSpot REST APIs and HubSpot properties, and supports token-based authentication.
Supported Versions: HubSpot API Version 3.0.
Querying Data: The HubSpot connector retrieves data using the HubSpot search API.
Authentication: HubSpot uses bearer token to do authentication and authorization. When making a call to one of the HubSpot API endpoints, set the value of the Authorization field to Bearer <your_token>, where <your_token> is the bearer token provided by HubSpot.
Data Operations: The HubSpot connector allows you to retrieve, insert, update, and delete data from/to HubSpot. Use HTTP methods (GET, POST, PUT, DELETE) to interact with records.
Custom Properties and Objects: The HubSpot connector supports custom properties for HubSpot standard and custom objects.
Note:  When creating a new map (manually or using the Map Wizard) and the target has no schema, DataConnect attempts to create one using the source schema. This is a straightforward process with a single record source to a single record target. The process differs with a multi-record (or hierarchical) source to multi-record target. In this case, DataConnect locates the first “flat” source record type (a record where none of the fields are themselves a record) and uses it to generate a basic schema for the target. Users can then build out the schema.
Prerequisites
Before using the connector, perform the following:
Obtain a HubSpot access token for API calls.
Obtain access permission for HubSpot objects.
Connector Parts
The HubSpot connector has a single connector part, an access token, which is granted to users by HubSpot.
Connector parts are the fields you configure to connect with a data source or target. The fields that are available depend on the connector you select.
For a list of all parts for source connectors, see Specifying Source Connector, Parts, and Properties.
For a list of all parts for target connectors, see Specifying Target Connector, Parts, and Properties.
Connector Properties
You can specify the following source (S) and target (T) properties:
Property
S/T
Description
PageSize
S
Maximum number of records that are returned in a response. The maximum limit is 100. Default value is 50.
Properties
S
A comma separated list of the properties to return in the response.
If no properties are defined, data are returned for the default properties: hs_object, hs_lastmodifieddate, and hs_createdate (or createdate).
If properties are defined, data are returned for the specified properties and the default properties.
Association
S
A comma separated list of objects to retrieve associated IDs. If defined, the associated id and the type of association are returned in the response.
Flush Frequency
T
Number of records buffered in memory before being written to the target. Default value is 0 (all records are written at once).
When inserting many records, change the default to a higher value to improve performance.
Batch Response
T
The file to which retrieve, insert, update, and delete operation results are written. The format is one entry per record, indicating success or failure. If operation fails, information about the cause of the failure is returned.
Default is to not write a batch response file.
HubSpot Objects
HubSpot objects are divided into standard objects and custom objects. The HubSpot connector supports the following HubSpot standard objects:
"calls", "cart", "communications", "companies", "contacts",
"deals", "discounts", "emails", "engagements", "fees",
"feedback_submissions","goal_targets", "line_items", "marketing_event","meeting_event",
"notes", "order","postal_mail", "products", "quotes",
"quote_template", "tasks", "taxes", "tickets"
A list of custom objects can be retrieved by API call. Custom objects are listed after the standard objects. Permissions must be set for each object in order to read and write.
Object Properties and Connector Schema
HubSpot object properties are used to store information on CRM records. HubSpot provides a set of default properties for each object. Properties can be used to populate the connector schema for the objects. Custom properties can also be created and managed in HubSpot, or using the properties API. 
CRM object properties can be obtained using following REST service call:
HttpGet("https://api.hubapi.com/crm/v3/properties/ " + object_name);
Data Type Support
The following data types are supported:
bool
date
datetime
string
numbers
enumeration
Source Connector
Several HubSpot APIs are provided for retrieving data from the server.
GET Request
To read one object, make a GET request to /crm/v3/objects/{object_name}. GET request has the following options: PageSize, Properties and Associations.
Query Statement
HubSpot connector uses HubSpot search API (see https://developers.hubspot.com/docs/api/crm/search#specify-returned-properties) for query support. The source connector supports all search APIs except that:
"objects":"object_name" must be added to JSON search criteria.
the limit parameter is replaced by PageSize option.
The following example posts JSON artifacts as the query statement to retrieve contacts records with firstname Alice:
{
"filterGroups":[
{
"objects":"contacts",
"filters":[
{
"propertyName": "firstname",
"operator": "EQ",
"value": "Alice"
}
]
}
]
}"
Batch/Read
Query statement also supports HubSpot batch/read API (see https://developers.hubspot.com/docs/api/crm/contacts). In the following example, JSON artifacts are posted.
Note:  In this example, the POST body must define "objects":"object_name".
{
"objects":"deals",
"properties": [
"dealname",
"dealstage",
"pipeline"
],
"idProperty": "uniqueordernumber",
"inputs": [
{
"id": "0001111"
},
{
"id": "0001112"
}
]
}
Target Connector
The HubSpot target connector only has APPEND mode to support the creation of HubSpot objects in batch.
Last modified date: 10/22/2024