How to Use Webhook Parameters in Interactive Videos
Cinema8 allows you to use webhook data to personalize your video by accessing object values such as user information.
Accessing Webhook Object Data
Let’s say the webhook sends the following object:
{
"score": 85,
"user": {
"firstName": "John",
"lastName": "Doe",
"userName": "john.doe"
}
}
You can extract and display values like firstName
, lastName
, and userName
directly in the video using the HTML element.
First, add the HTML element to your video.
Learn how to add HTML elements →
Then insert the appropriate display code inside the element to show the webhook parameters.
Preview the video to see the dynamic values appear.
Using Conditional Logic with Webhook Parameters
To take it further, you can conditionally control elements based on webhook values.
-
Add a Conditional Action element to your video.
Learn how to add conditional actions → -
In the condition configuration, add:
user.username = john.doe
user
refers to the object from the webhook payload, andusername
is the field you’re matching.
This conditional logic will only trigger if the webhook data has been successfully received by the video.