Peakboard Insights

Create an interactive form for quick contact data transfer to HubSpot

In recent years HubSpot has established itself as a leading tool for marketing automation and sales. Companies increasingly use it to collect contacts in a variety of ways and add them to their HubSpot database. This article walks you through building a self-service form that submits contact information to HubSpot seamlessly — and shows how to use the HubSpot API to optimise your customer interactions and improve marketing and sales efficiency.

12.06.2025

·

3 min read

Ice cream parlour employee hands a customer an ice cream at the counter, an example of retail customer service.
Key takeaways
  • Peakboard can send contact data straight to HubSpot via an interactive terminal.
  • The connection runs through the HubSpot API using a REST call.
  • Captured data lands directly in the CRM without manual re-entry.
  • The post shows this step by step using a self-service form.

Interactive self-service form for ice cream lovers

Let's assume an ice cream company uses a self-service terminal next to an ice cream stand to ask customers what their favourite flavour is. Customers can also enter a prize draw. Naturally the company wants all that data in HubSpot as quickly as possible, so it can get in touch with the customer and send them a newsletter and further information. The example in this article shows how to build a JSON string and send it to a real-world API.

The HubSpot API

Using the HubSpot API is not particularly complicated and is based on typical REST web services. The endpoint we use is https://api.hubapi.com/crm/v3/objects/contacts.

Since we want to create a contact in HubSpot, we have to submit a JSON string in the body of the HTTP call. Below is a very simple example of what that JSON string has to look like for the HubSpot server to understand it. We supply the name, the email address and a custom HubSpot field called 'favorite_ice_cream' holding the flavour the customer selected in the form.

{
  "properties": {
    "firstname": "@name",
    "email": "@email",
    "favorite_ice_cream": "@flavor"
  }
}

For authentication you need to submit an API token. To get one, go to the settings area of your HubSpot account and create a private app, then save the token for later use when Peakboard makes the call.

HubSpot settings view for creating and managing private apps.

Now build the application screen in Peakboard

You want to give the user the option of choosing their flavour from a drop-down list. To fill that list with the appropriate values, create a variable list containing all the possible flavours. It is a simple list with just one column.

Peakboard Designer showing a variable list with its contents.

The screen itself is kept simple. We choose an attractive background image, add the text and place the interactive elements on the screen. To fill the drop-down list with values, we connect it to the variable list. We also give all three input controls a suitable name so we can address them from our code.

Peakboard Designer displaying an application with a dropdown menu for user selection.

Building the REST call

Let's look at the code behind the 'Submit' button. Here is what happens:

  1. The JSON string is stored in a variable containing three placeholders. They all start with an @ sign to make them easier to identify.
  2. The placeholders are replaced with the actual values coming from the three input controls on the screen.
  3. This is the actual HTTP call. It is a POST call, as set out in the HubSpot documentation. You need to add two headers to get it working.
    • The first header is 'Authorization'. Here you submit the value 'Bearer <myToken>'. Replace <myToken> with the token we created in the HubSpot interface above.
    • The second header is 'Content-Type'. You have to set it to 'application/json', otherwise HubSpot would not understand what to do with the string in the HTTP body.

If this were not just an example, you would check the return message for errors. To keep things simple, we just write the response to the log instead.

Peakboard Designer showing the low-code Building Blocks editor for logic creation.

The result

Peakboard application with form fields and submit button for a prize draw entry.

Let's check the log. We can see the dynamically created JSON, and we can also see the response from the HubSpot API server.

Peakboard Designer displaying log entries for debugging and monitoring.

And here is the result in HubSpot

HubSpot entry created via a form submission in a Peakboard application.

‍

Frequently asked questions about the HubSpot connection

Can Peakboard send data to HubSpot?

Yes. Via a REST call to the HubSpot API, Peakboard sends captured contact data straight into the CRM – for example from a self-service form.

How does the connection work technically?

In Peakboard Designer you build an application screen and configure a REST call that passes the inputs to the HubSpot API.

What is this useful for in practice?

For self-service terminals, trade-show booths or reception areas where contact data should flow directly into the CRM without manual re-entry.

Share this article:
Portrait of Michelle, smiling, close-up against a light neutral background.
Author: Michelle

Michelle is passionate about cutting-edge technology and loves telling others about the interesting world of innovation. As a technology enthusiast at Peakboard, she is constantly exploring the latest trends and developments.

Snow-covered mountain with orange markings along the summit.
Black and white image of snow-covered mountains in a valley.
White clouds running in horizontal lines against a black background.
White clouds running in horizontal lines against a black background.