Register to an Event From a Hubspot Form

If you're using Hubspot as your CRM, it is possible for you to connect it to Livestorm. You can send data from Livestorm to Hubspot using our native integration. But you may also want to use your Hubspot form to directly register contacts to a Livestorm event or handle the emailing campaign about your event directly within Hubspot.

In this article, we'll show you how to connect your Hubspot form to a Livestorm event and, optionally, get all the information needed for your emailing campaign directly in Hubspot.

The following procedure is only for the first time you set up an interconnection between your Hubspot form and your Livestorm event. Then, you will just need to duplicate your workflow and change the form and the session you are connecting (step 7).

Add the following custom properties to your contacts:

  • 'livestorm_session_id' (single-line text)
  • 'livestorm_connection_link' (single-line text) (only necessary if you need to store the access link in Hubspot)
Create a new Blank Workflow and set the completion of your form as the trigger:

  • In Automation > Workflows > Create Workflow > Blank workflow
  • Click on Set up triggers, select Form submission, select the form you want to connect to Livestorm, and optionally the page on which it needs to have been filled, then press save.
Add an action 'Set property value' and set 'livestorm_session_id' to the id of the session you want to connect to. (You can find this id in the URL of your session).
Add an action 'Custom code':
  • In 'Secrets', add the variable 'APIKey' whose value is your Livestorm API Key.
  • In 'Property to include in your code', add 'livestorm_session_id' as well as all the potential custom properties you need to map between your Hubspot form and Livestorm registration. You will need to include at least the Email, First Name, and Last Name of the contact.
  • Add the following code:
const hubspot = require('@hubspot/api-client');
const axios = require('axios')
exports.main = async (event, callback) => {

//Get contact properties
const email = event.inputFields['email'];
const firstName = event.inputFields['firstname'];
const lastName = event.inputFields['lastname'];
//ADD Custom properties here
/*const customProperty = event.inputFields['hubspot_custom_property'];*/
//Get API Key
const apiKey=process.env.APIKey;
//Get Session ID
const sessionId=event.inputFields['livestorm_session_id'];
var body = {"data":{
			//Map Custom properties here
const headers={
    Accept: 'application/vnd.api+json',
    'Content-Type': 'application/vnd.api+json',
    Authorization: apiKey

//POST Registrant to Session'<'+sessionId+'/people>', body,{headers: headers})
    outputFields: {
} )
  .catch(err => console.error(err));
  • In 'Data output', add a string "contact_connection_link" (only necessary if you need to store the access link in Hubspot).
Add an action 'Copy property value' and copy "contact_connection_link" to Contact's property "livestorm_connection_link" (only necessary if you need to store the access link in Hubspot).
If your workflow looks like below, then you're ready to  activate it in the top right corner. 🎉

For your next integrations, you can just clone this workflow and:
  • Change the trigger by changing the form and/or the page in the first step of the workflow.
  • Change the session ID in the second step.

Additional information

  • To get data from your Livestorm events back to Hubspot, check out our native integration!
  • Use the "livestorm_connection_link" directly in your email campaign.
  • If you'd like the lead to select in your form among several sessions, you can use a select field in your form where the display value is the name of your session and the code is the ID of the session. In this case, you would remove the second step of the workflow and use that field to get the session ID. However, the sessions' ids still need to be input manually as options of your dropdown property.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.