Skip to main content

Hubspot

This page describes how to set up Hubspot as a destination.

Set up

An example setup for Hubspot is shown below.

src/pages/api/syft.ts
// ...
const destinations = [
{
type: "hubspot",
settings: {
portalId: "xxxx",
access_token: "xxxx"
},
},
];
// ...

Configuration options

NameTypeDescriptionRequiredDefault
portalIdstringThe Hub ID of your HubSpot account.true
access_tokenstringAccess token to access the destination.true
refresh_tokenstringRefresh Token (If applicable)false
refresh_token_urlstringRefresh token URL (If applicable)false
clientIdstringClient ID (If applicable)false
clientSecretstringClient Secret (If applicable)false

Data Modeling

Upsert Company

Upsert Company

Create or update a company in HubSpot.

Matched events

type = "group"

Data Mapping

Destination FieldTypeDescriptionSource Field
groupidstringA unique identifier you assign to a company. Syft creates a custom property in HubSpot to store this value for each company so it can be used as a unique search field. Syft recommends not changing this value once set to avoid creating duplicate companies.$.groupId ?? $.context.groupId
createNewCompanybooleanIf true, Syft will attempt to update an existing company in HubSpot and if no company is found, Syft will create a new company. If false, Syft will only attempt to update an existing company and never create a new company. This is set to true by default.true
associateContactbooleanIf true, Syft will associate the company with the user identified in your payload. If no contact is found in HubSpot, an error is thrown and the company is not created/updated. If false, Syft will not attempt to associate a contact with the company and companies can be created/updated without requiring a contact association. This is set to true by default.false
companysearchfieldsobjectThe unique field(s) used to search for an existing company in HubSpot to update. By default, Syft creates a custom property to store groupId for each company and uses this property to search for companies. If a company is not found, the fields provided here are then used to search. If a company is still not found, a new one is created.$.companysearchfields
namestringThe name of the company.$.traits.name
descriptionstringA short statement about the company’s mission and goals.$.traits.description
addressstringThe street address of the company.$.traits.address.street
citystringThe city where the company is located.$.traits.address.city
statestringThe state or region where the company is located.$.traits.address.state
zipstringThe postal or zip code of the company.$.traits.address.postalCode ?? $.traits.address.postal_code
domainstringThe company’s website domain.$.traits.website
phonestringThe company’s primary phone number.$.traits.phone
numberofemployeesintegerThe total number of people who work for the company.$.traits.employees
industrystringThe type of business the company performs.$.traits.industry
lifecyclestagestringThe company’s stage within the marketing/sales process. See more information on default and custom stages in HubSpot’s documentation. Syft supports moving status forwards or backwards.$.lifecyclestage
propertiesobjectAny other default or custom company properties. On the left-hand side, input the internal name of the property as seen in your HubSpot account. On the right-hand side, map the Syft field that contains the value. Custom properties must be predefined in HubSpot. See more information in HubSpot’s documentation. Important: Do not use ’syft_group_id’ here as it is an internal property and will result in an an error.$.properties
,
Upsert Contact

Upsert Contact

Create or update a contact in HubSpot.

Matched events

type = "identify"

Data Mapping

Destination FieldTypeDescriptionSource Field
emailstringThe contact’s email. Email is used to uniquely identify contact records in HubSpot. If an existing contact is found with this email, we will update the contact. If a contact is not found, we will create a new contact.$.traits.email
companystringThe contact’s company.$.traits.company
firstnamestringThe contact’s first name.$.traits.first_name ?? $.traits.firstName
lastnamestringThe contact’s last name.$.traits.last_name ?? $.traits.lastName
phonestringThe contact’s phone number.$.traits.phone
addressstringThe contact's street address, including apartment or unit number.$.traits.address.street
citystringThe contact's city of residence.$.traits.address.city
statestringThe contact's state of residence.$.traits.address.state
countrystringThe contact's country of residence.$.traits.address.country
zipstringThe contact's zip code.$.traits.address.postalCode ?? $.traits.address.postal_code
websitestringThe contact’s company/other website.$.traits.website
lifecyclestagestringThe contact’s stage within the marketing/sales process. See more information on default and custom stages in HubSpot’s documentation. Syft supports moving status forwards or backwards.$.lifecyclestage
propertiesobjectAny other default or custom contact properties. On the left-hand side, input the internal name of the property as seen in your HubSpot account. On the right-hand side, map the Syft field that contains the value. Custom properties must be predefined in HubSpot. See more information in HubSpot’s documentation.$.properties