Template catalog


Collect Data and send to HubSpot through a Web Request Action (GET Method demo)

This chatbot demostrate how you can use a Web Request Action to Collect user data and send it to HubSpot through a Web Request Action

image describing the tiledesk community chatbot

Customize this template quickly & easily with Tiledesk

Designed by

logo of the author of the chatbot published in the tiledesk community

Andrea Sponziello

Published on

5/1/2024

Last update on

11/1/2024

Share this template to:

Try the Chatbot

More about this template



This simple chatbot gets user data through a dyna-form and then creates (or updates) a Contact on [Hubspot](https://www.hubspot.com/).

To use this integration you need a Hubspot Access token. We'll learn how to create one.

We use the "Capture user reply" action to ask the follwing data, creating the corresponding chatbot attributes:

  • User first name. Attribute: firstname
  • User full name. Attribute: lastname
  • User email. Attribute: userEmail

Once the form is configured you can move to the next step, sending contact's data to Hubspot.

To achieve this goal first create a new Private App on Hubspot. In this way you will get a new Access token to connect to their APIs.

Hubspot Private app

When asked, select the "scope" of your app, taking care of selectiong "contacts" and assigning at least the Write permission (that we use for our chatbot).

Once created you can go to the App's details page where you can get your Access token. We'll use this later.

Configure your connection

Now back to our chatbot.

Add the Hubspot APIKEY to the Globals section of your chatbot.

Now add a WebRequest Action from the side menu.

The WebRequest Action simply executes an HTTP call to the Hubspot "create a contact" REST API. See related https://developers.hubspot.com/docs/api/crm/contacts documentation.

Setup the HTTP url with the documented API endpoint using the POST HTTP method.

Hubspot contact's API endpoint:

https://api.hubapi.com/crm/v3/objects/contacts

Then setup all the HTTP headers fields as in the picture, taking care to add or customize the Authorization header field with your own Access token.

Contact JSON body:

{
    "properties": {
        "email": "{{userEmail}}",
        "firstname": "{{firstname}}",
        "lastname": "{{lastname}}"
    }
}

Well, now press Test it out to see the chatbot in action:

As soon as the conversation ends The WebRequest action sends all the contact data to Hubspot Contacts. You we'll see your updated contact in the Hubspot's Contact center:

Hope you enjoy this simple chatbot 🤖

If you need any help please feel free to contact me at andrea at tiledesk.com 🤓

Tags

    #hubspot

    #webrequest

    #chatbot

    #lead generation

Integrations

Once designed, you can run your unlimited no-code chatbots on every communication channel of your choosing. Be it WhatsApp, Telegram or Facebook Messenger. With no further clicks or actions.