Register to a Livestorm 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 registration 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 registration form to a Livestorm event and, optionally, get all the information needed for your emailing campaign directly in Hubspot.

The following procedures are only for the first time you set up an interconnection between your Hubspot registration form and your Livestorm event. Then, you will just need to duplicate your workflow, and change the Hubspot registration form and the session you are connecting (step 5 if you want to create a HubSpot registration form without code, and step 7 if you prefer to create it with custom code).

In this article

Create a Hubspot Registration Form for a Livestorm Event - No Code Needed

1
Add the following custom properties to your contacts:

  • "livestorm_session_id" (single-line text).
2
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 Hubspot registration form you want to connect to Livestorm, and optionally the page on which it needs to have been filled, then press Save.
3

Add an action Create Livestorm Registrant, 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), and add the variable "API Key" whose value is your Livestorm API Key.

The API token must be created with " Write" scope permissions (full read and write access).

4
If your workflow looks like that, then you're ready to activate it in the top right corner. 🎉
5
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!
  • Alternatively, you can use a hidden field in your forms to input the "livestorm_session_id", and remove the Set property value action. This way, you can use the same workflow to connect all your forms.

Create a Hubspot Registration Form for a Livestorm Event - Code Needed

This process is only available for "Operation Hub Professional" Hubspot plan customers.

1
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).
2
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 Hubspot registration form you want to connect to Livestorm, and optionally the page on which it needs to have been filled, then press Save.
3

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).

The API token must be created with " Write" scope permissions (full read and write access).

4
Add an action Custom code:
  • In Secrets, add the variable "API Key" 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 registration 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":{
    	"type":"people",
               	"attributes":{
                  "fields":[
                    {"id":"email",
                     "value":email},
                    {"id":"first_name",
                     "value":firstName},
                    {"id":"last_name",
                     "value":lastName}
			//Map Custom properties here
			/*,{"id":"livestorm_custom_property",
                     "value":customProperty}*/
                  ]
                }
  	 }
             };
 
const headers={
    Accept: 'application/vnd.api+json',
    'Content-Type': 'application/vnd.api+json',
    Authorization: apiKey
  };

//POST Registrant to Session 
 
axios.post('<https://api.livestorm.co/v1/sessions/'+sessionId+'/people>', body,{headers: headers})
  .then(function(response){
	callback({
    outputFields: {
      contact_connection_link: response.data.data.attributes.registrant_detail.connection_link
    }
  });
} )
  .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).
5
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).
6
If your workflow looks like below, then you're ready to activate it in the top right corner. 🎉

7
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 Hubspot registration 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.