Skip to main content
By default the source of truth for contacts in Hilos is HubSpot, however sometimes in your flows you may want to update information gathered from questions or other sources to your contacts in HubSpot, this can be easily done using the API step in your flow, here is how you can do it:

Prerequisites

To follow along this guide you’ll need to get your bearer token from HubSpot. You can find the instructions on how to get it here. Remember to correctly set the Read/Write actions depending on wether you want to be able to update that information using the API step from Hilos or not.

Retrieving your contacts

To retrieve a contact from HubSpot you can make a GET request to the /crm/v3/objects/contacts HubSpot endpoint. This will return a list of contacts that match the query parameters you provide. You can learn more about this endpoint on the HubSpot API documentation. Get all contacts If you wish to retrieve an specific contact you may want to use the GET request to /crm/v3/objects/contacts/{contactId} endpoint instead. Get a specific contact

Update a contact

To update a contact in HubSpot you can make a PATCH request to the /crm/v3/objects/contacts/{contactId} HubSpot endpoint. This will update the contact with the provided contactId with the information you provide in the request body under the properties key. You can learn more about this endpoint on the HubSpot API documentation. An example call to update a contact would look like this:
{
  "properties": {
    "email": "dan@hilos.io"
  }
}
Remember you can use the results from the API step as a variable for a later step in your flow. This allows you to easily update the information according to a previous result, however when testing you might need to hardcode the contactId to make sure the request is successful. Then before publishing change the contactId to the variable you want to use.
Update a contact