Webhook Rule Function Overview
Webhook rule functions enable you to trigger third-party endpoints by setting up customizable HTTP requests based on defined conditions.
Creating the function
To create the function, go to the device detail page, click on the Functions
tab and click on the Create function
button.
Then, click on the Get started
button for the Rule function
and choose Webhooks
from the list.
Function basics
The Debounce Period
prevents the repetitive execution of functions and is disabled by default.
Even if conditions are continually met, this setting ensures the function only triggers once within a defined time period, avoiding unnecessary repetitive actions.
Give a unique name and a description for the function and click on the Next
button.
Template configuration
Webhook URL
: The URL of the external platform.Request method
: [POST, PUT, GET, DELETE]Request headers
: The headers for the requestRequest body payload
: The body of the request
The custom request body payload is a JSON object that is passed to the request as the body parameter.
The ${{}}
syntax is used to specify the value of a property in the incoming data.
The following is an example of a custom request body.
{
"custom_key": "Custom_Value",
"humidity": ${{AIR_HUMIDITY}},
"other": ${{PUT_INCOMING_DATA_KEY}}
}
An example configuration:
Once the configuration is finished, click on the Next
button to configure conditions.
Condition configuration
Condition configuration allows you to specify the conditions that must be met for a rule to be triggered.
An example configuration:
Once the condition is configured, click on the Done
button to save the function.
Start building today
Collect, process, and activate device data. Scale from one device to thousands.