Hubspot
Last updated
Was this helpful?
Last updated
Was this helpful?
Hubspot custom properties allow you to map non-standard data from your source app to Hubspot. Follow the instructions in the linked article to learn how to setup custom fields in your Hubspot instance: https://knowledge.hubspot.com/properties/create-and-edit-properties
Within the action to update or create a contact in Hubspot, you can construct an array of key-value pair objects to map integrated data to your custom property.
You will need to enter the internal name as the key in Middle. To view the internal name of a property click the </> code code icon to view or set the internal name for the property, with a maximum of 100 characters.
Once a property is created, the internal name cannot be edited
To create this array, follow the below steps:
Create a new action node in your workflow and then select the action to create or update a contact in Hubspot
Click to create a new parameter under any of the three customer property arrays
Click to construct an array
Add a new parameter within this array
Click to construct an object
This will give you an object where you can add a text box to the custom field key and then map your data in the value
This input parameter can accept all data types. If you receive a data type error in the workflow editor, you can feel free to ignore it.
To connect your source-app data with HubSpot objects, create a custom property in HubSpot that stores the primary ID from the source system.
For example, when syncing customer data to HubSpot contacts, define a property (e.g., external_customer_id
) to hold the customer ID from the source app. This enables workflows to look up and match HubSpot records using that unique identifier.
HubSpot also allows you to enforce uniqueness on custom properties across a given object type. By setting your customer ID property to be unique, HubSpot will prevent duplicate contacts from being created with the same ID—ensuring data integrity and supporting reliable record lookups in workflows.
Once a property is created in HubSpot, you cannot retroactively set it as unique. To enforce uniqueness, you’ll need to create a new property with the unique setting enabled, then use a workflow to copy values from the original property to the new one.
As an integrator, using unique properties in HubSpot offers several advantages:
Secondary Identifier: Unique properties can serve as secondary IDs when importing data manually or through the API
Streamlined API Updates: Certain HubSpot APIs—such as the Deals API—allow you to update records directly using a unique property, eliminating the need for additional lookup steps
HubSpot provides an Associations API that lets you create relationships between two objects (e.g., contacts and deals, companies and tickets). To use it, you must supply:
The object IDs of both items you want to associate.
The appropriate association type ID, which varies depending on the specific object types involved (e.g., contact-to-deal, deal-to-company).
This allows you to programmatically link records and maintain relational context across your CRM data.
Finding the object IDs needed for associations can be API-intensive, often requiring multiple lookups. To reduce this load and streamline your Middle workflow, you can offload the association step to a HubSpot workflow.
We recommend using a unique identifier, such as external_customer_id
, to link objects. By referencing this unique property, HubSpot workflows can associate records without requiring your integration to perform direct ID lookups.
We also recommend creating a dedicated workflow for each object type you intend to associate. This ensures associations are applied regardless of the order in which the objects are created.
For example, if you're associating Deals and Contacts, you should create two separate workflows:
One that triggers when a Deal is created or when an external_customer_id
is added.
Another that triggers when a Contact is created or when its external_customer_id
is added.
This approach ensures that the association is made as soon as both objects have matching identifiers, even if they’re created at different times.