HubSpot
target-hubspot (meltanolabs variant)
HubSpot is a CRM platform that provides tools for marketing, sales, and customer service. This loader writes records into HubSpot CRM objects through the CRM Imports API: each batch of up to 10,000 records becomes one CSV import, and the loader waits for HubSpot to finish it.
Prerequisites
You need a Private App access token:
- In your HubSpot account, go to Settings → Integrations → Private Apps
- Create a private app with the
crm.importscope, plus write scopes for each object you load (for examplecrm.objects.contacts.write) - Copy the generated access token
Data requirements
HubSpot maps CSV columns to properties through column_mapping:
- Add one
column_mappingentry for each stream property you want to load, with acolumnNamethat matches the property name exactly. The loader fails the run when an entry names a property the stream does not have, and leaves properties without an entry out of the import. column_mappingapplies to every stream, so load one stream per pipeline.- Mark the column that identifies existing records with
columnType: HUBSPOT_OBJECT_ID(the record ID) orHUBSPOT_ALTERNATE_ID(a unique property such as a contact'semail). - Enable
flattening_enabledwhen the stream has nested objects. Otherwise the loader writes them as JSON text. - The loader writes date values in
date_format, and date and time values as UNIX timestamps in milliseconds.
An import that fails, or finishes with row errors, fails the run, and the loader logs the first ten row errors. Open Import history in HubSpot for the full list.
Example
[
{"columnName": "email", "propertyName": "email", "columnObjectTypeId": "0-1", "columnType": "HUBSPOT_ALTERNATE_ID"},
{"columnName": "first_name", "propertyName": "firstname", "columnObjectTypeId": "0-1"},
{"columnName": "last_name", "propertyName": "lastname", "columnObjectTypeId": "0-1"}
]
Settings
Access Token
Your HubSpot private app access token. See the docs for more details.
Column Mapping
One object per stream property, with these keys:
columnName— the stream property name to loadpropertyName— the internal name of the HubSpot property (in HubSpot, Settings → Data Management → Properties, then the code icon next to the property label)columnObjectTypeId— the object type ID, for example0-1(contacts),0-2(companies),0-3(deals),0-5(tickets) or2-123456(a custom object)columnType— optional;HUBSPOT_OBJECT_IDorHUBSPOT_ALTERNATE_IDfor the column that identifies existing records
Date Format
The format the loader writes date values in, and HubSpot reads them in. Date and time values are written as UNIX timestamps in milliseconds.
Import Operations
Whether the import only creates records, only updates existing records, or does both.
Applies to every object type in column_mapping.
Import Timeout Seconds
How long to wait for HubSpot to finish each import before failing the run.
Stream Maps
Config object for stream maps capability. For more information check out Stream Maps.
Stream Map Config
User-defined config values to be used within map expressions.
Flattening Enabled
'True' to enable schema flattening and automatically expand nested properties.
Flattening Max Depth
The max depth to flatten schemas.
HubSpot connector is available on Meltano. It is built, maintained, supported, and tested by Meltano.