This process is only available for "Operation Hub Professional" and "Operation Hub Enterprise" HubSpot plan customers.
This process is only available for "Operation Hub Professional" and "Operation Hub Enterprise" HubSpot plan customers.
1
Following the same process as for the previous section, create a custom property to your HubSpot contacts for every data point you would like to pass from HubSpot to Livestorm, using this format:
"Custom property" (single-line text).
2
Sames as before, create a new Blank Workflow, and set the completion of your form as the trigger:
3
If you are using the dynamic approach in which you added the session ID as the default value in the Livestorm Session ID hidden field in your form, then proceed to the next step. Otherwise add an action Set property value  and set "livestorm_session_id" to the ID of the session you want to connect to:
Make sure to paste the SESSION id and not the event id. đ
The API token must be created with " Write" scope permissions (full read and write access).
4
Add an action Custom code:
In Secrets, click on Choose secret, and then on Add secret. In the field "Secret name", type "API_Key" and in the field "Secret Value", type your Livestorm API Key. It should look similar to this:
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 axios = require('axios')
exports.main = async (event, callback) => {
//Get contact properties
const { email, firstname, lastname, livestorm_session_id: sessionId } = event.inputFields;
const 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: event.inputFields['hubspot_custom_property']
},
*/
],
},
},
};
const headers = {
'Accept': 'application/vnd.api+json',
'Content-Type': 'application/vnd.api+json',
'Authorization': process.env.APIKey,
};
// POST Registrant to Session
axios.post(`https://api.livestorm.co/v1/sessions/${sessionId}/people`, body, { headers })
.then((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.
During this 30-minute live event, we will introduce you to the platform. You will learn how to use Livestorm for your webinars and online meetings.