LogoLogo
HOMEAPPSBLOGDEVELOPERSGET A DEMO
  • Overview
    • Data
    • Middle's infrastructure
    • ENTERPRISE installations
    • Security
  • Workflows
    • Enable/disable an account
    • Connect or edit an app connection
    • Sync
      • Stored records
      • Sync history
    • Create or copy a workflow
    • Edit an existing workflow
    • Workflow steps
    • Workflow parameters
    • Triggers
  • User access
  • Performance
  • Data deletion
  • App development
    • Authentication
    • Credential storage
    • Sync records
    • Actions
    • Code packages
    • Upload scripts
    • Testing your apps
    • Versions
    • Monitor
  • Guides
    • API limits
    • App Reference
      • HighLevel
      • Hubspot
    • Building an API for Middle
    • Getting app credentials
      • ABC Ignite
      • Amazon S3
      • Clover
      • Emma
      • Erply
      • Facebook
      • fitDEGREE
      • Glofox
      • Gmail
      • Google Sheets
      • HighLevel
      • Hubspot
      • Keap Max
      • Klaviyo
      • Lightspeed R-Series
      • Lightspeed X-Series
      • Mailchimp
      • Mindbody
      • OpenAI
      • Paramount Acceptance
      • Pike13
      • Salesforce
      • Shopify
      • Slack
      • Square
      • Vend
      • Xn
    • Development best practices
  • FAQs
    • What data is available?
Powered by GitBook
On this page
  • Contact Custom Properties
  • Custom property mapping in Middle
  • External ID properties
  • Unique properties
  • Associating objects
  • Using Hubspot workflows to associate objects

Was this helpful?

  1. Guides
  2. App Reference

Hubspot

PreviousHighLevelNextBuilding an API for Middle

Last updated 1 day ago

Was this helpful?

Contact Custom Properties

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

Custom property mapping in Middle

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.

Internal name

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:

  1. Create a new action node in your workflow and then select the action to create or update a contact in Hubspot

  2. Click to create a new parameter under any of the three customer property arrays

  3. Click to construct an array

  4. Add a new parameter within this array

  5. Click to construct an object

  6. 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.

External ID properties

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.

Unique properties

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

Associating objects

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.

Click to view Hubspot association IDs

Using Hubspot workflows to associate objects

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.

The internal name can also be found in your property settings
Example of a key-value pair object array mapping data to Hubspot custom properties
When setting up a new property you can select "Require uinque values for this property" on the Rules page
A Create Association action that uses member ID on both a deal and contact object to associate the two
Video on using a workflow to create associations between two Hubspot objects