It seems you just got a notification from us with a subject like "Hubspot API Error", right?!
Don't worry, we got you and here you'll find some common API errors from HubSpot and how to address them.
These notifications are sent from Hubspot to Chili Piper during the Contact creation or update process, pointing out that something unexpected happened during these processes.
They should be received by your org's global integration user, but we do have a suggestion that can be found here to ensure that a larger audience will have access to these errors.
Table of Contents
How to Identify the Error?
The first step is checking the notification and taking a look at its body:
In the body itself, you'll find more details about the error, more specifically right after the "message" entry.
We will cover some common errors separately in the next section.
Common Errors & How to Fix Them
Contact already exists
This error was sent because Chili Piper attempted to create a Contact record, but we had another external source (for example, Marketing forms like Hubspot Forms, Marketo, Pardot) trying the same operation at the same time, so we got something like this:
body : Some({"status":"error","message":"Contact already exists. Existing ID: 48521351","correlationId":"124fb647-d520-4a55-912b-86c2ca0b5626","category":"CONFLICT"})
To fix this issue, you'll need to ensure that only one system (Chili Piper's router or your marketing form) is operating to create Contacts.
If you're willing to turn off the Contact creation from Chili Piper, that should be fine! You can do it by opening your router, expanding the "Hubspot CRM options" setting, and turning the setting below off:
Property values were not valid
This error indicates that the data we tried to write to Hubspot wasn't expected or, as the error suggests, valid.
This commonly happens in the following scenarios:
Picklist Property Option Wasn't Found
When the property is a Picklist field, and the value we tried to update wasn't an option. If that's the case, you should see "value was not one of the allowed options" right after the "message" entry.
body : Some({"status":"error","message":"Property values were not valid: [{\"isValid\":false,\"message\":\"Maybe was not one of the allowed options: [label: \\\"Yes\\\"\\nvalue: \\\"true\\\"\\ndisplay_order: 0\\nhidden: false\\nread_only: false\\n, label: \\\"No\\\"\\nvalue: \\\"false\\\"\\ndisplay_order: 1\\nhidden: false\\nread_only: false\\n]\",\"error\":\"INVALID_OPTION\",\"name\":\"waylon__mql_contact\"}]","correlationId":"cab73884-f19d-4dd7-94f4-6818fc9fa5df","category":"VALIDATION_ERROR"})
For example, supposing you have a picklist field with "Yes" and "No" as options, and the value we received from your form was "Maybe", then the error will be triggered as "Maybe" wasn't found as an option.
If that's the case, you can find the field we tried to update by scrolling down in the e-mail, in the "Raw prospect details used for creation" section right below.
To fix this error, you can:
- Include the missing option under your property's picklist values. After that, we recommend refreshing fields in the Admin Center's Integrations page to ensure the update will be reflected.
- Remove the missing option from your marketing form, and keep only the ones that are available in Hubspot.
Property Data is Invalid
This one happens when Hubspot expects a standard format for a property and receives something different. If that's the case, you should see "field name value is invalid" right after the "message" entry.
body : Some({"status":"error","message":"Property values were not valid: [{\"isValid\":false,\"message\":\"Email address john is invalid\",\"error\":\"INVALID_EMAIL\",\"name\":\"email\"}]","correlationId":"ca3d086b-568d-4fd8-a97b-51fca63bd081","category":"VALIDATION_ERROR"})
For example, supposing someone filled out "john" in the e-mail field, this will return an error because Hubspot expects something like "name@domain.com", so "john" isn't in a valid format.
We recommend adding some validation to your form to ensure only valid e-mail (or other affected fields) formats will be included by prospects, not allowing them to type anything out of Hubspot standards.