Table of Contents

Create a Contact in HubSpot

Abby Updated by Abby

This workaround is for the new HubSpot API released in October 2022

Now you will need to create a private app in Hubspot to get a new API key

You can see how to do this here.

Once the new app is created you will set the scopes, we will use the following:

Now we just need to copy the new API token

In our bot we'll add a webhook that will make a POST to this endpoint: https://api.hubapi.com/crm/v3/objects/contacts

In the Header we'll add our API token:

We'll add authorization as the Key and Bearer xxtokenherexx

Lastly, in the Body of our webhook we'll add any properties we want to send

{ "properties": { "company": "@{company}", "email": "@{email}", "firstname": "@{name}", "lastname": "@{lastname}", "phone": "@{phone}", "website": "@{website}" }}

We don't need to worry about matching the form exactly, any properties we don't send, simply won't be added

Once we test the request, we should get this response:

If the user already exists we'll get the following response:

We can use response routing to handle the cases where the contact already exists in our crm

Was this article helpful?

HubSpot Calendar in Landbot

How to Use the HubSpot Integration Block

Contact