Send contact info to Hubspot CRM

We have built a Brick that is going to help the process to send information you collect directly to Hubspot CRM.

What we are going to do is to make use of Hubspot API and it's forms, but we will send the data via Webhook improving the user experience. All this with a pre-built Brick (Hubspot - Form - API v0.1) that you can start using right now.

Here are the steps:

  1. In your Hubspot account select Marketing:

  1. From this menu, select Lead Capture and Forms:

  1. Select Create form:

  1. Select Regular From and press NEXT:

  1. Select Blank Template and press Start:

  1. Now we are going to add the information that we want to get from the user and send to Landbot. In this example (like in the Brick) we are going to use Email, First Name, Last Name and Phone:

  1. Give a name to the Form:

Like Landbot:

  1. Press Share:

  1. Select Embed Code:

  1. From this Code we need to keep 2 things: the portalId (in this case is 5725711) and the formId (in this case 520992e3-e2a4-4bb1-8dac-f0510384e7b1):

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/shell.js"></script>
<script>
hbspt.forms.create({
portalId: "5725711",
formId: "520992e3-e2a4-4bb1-8dac-f0510384e7b1"
});
</script>

  1. Now we can return to Landbot an import the Brick called Hubspot - Form - API v0.1:

And access to the Brick to edit it:

  1. Here you have already built both parts, the questions and the webhook that we will use to send the information to Hubspot. What is important is and we need to edit accordingly is the URL:

As you can see in our example, the url contains to elements from Hubspot code:

The portalId (5725711) and the formId (520992e3-e2a4-4bb1-8dac-f0510384e7b1). Please change it according to your needs

https://api.hsforms.com/submissions/v3/integration/submit/5725711/520992e3-e2a4-4bb1-8dac-f0510384e7b1

  1. The request body in our example is based on our needs (email, firstname, lastname and phone). Edit if you need it.
{

"fields": [
{
"name": "email",
"value": "@email"
},
{
"name": "firstname",
"value": "@firstname"
},
{
"name": "lastname",
"value": "@lastname"
},
{
"name": "phone",
"value": "@phone"
}
]
}

And that's it. Now you can add new contact to your Hubspot CRM with Landbot ;)

Another approach from our community: Track users with Hubspot tracking and Landbot.

In case you are interested, a member of our Landbot community Campmany Abogados, has shared with us this great workaround, bear in mind it's written in Spanish. Please follow this link.


How did we do?


Powered by HelpDocs

Powered by HelpDocs