This action allows you to call a custom webhook.
Inputs
URL
The URL of the webhook.
In the case of a GET call, this should also include any parameters you wish to pass.
You can include the value of your variables by enclosing them in square brackets, for example [ppl_at_home]
would output the value of the variable ppl_at_home.
Simiarly, you can include the value of sequence parameters by enclosing them in curly brackets, for example {current_temp}
would output the value of the sequence parameter current_temp.
It's recommended not to have any spaces in the URL you're using.
Method
The HTTP method to use - either GET or POST.
Content type
Set to one of the following:
- plain text
- JSON if the body will be passing JSON data, such as
{"device_id":1234, "brightness":50}
- WWW form URL encoded if the body will contain a standard query string, such as
device_id=1234&brightness=50
Headers
Any additional headers to be included in the request. This is only required if relevant to your webhook.
Each header should be on a separate line.
Body
The content of body to be passed to the webhook. This is only required if relevant to your webhook, and should align with the format selected under content type above.
You can include the value of your variables by enclosing them in square brackets, for example [ppl_at_home]
would output the value of the variable ppl_at_home.
Similarly, you can include the value of sequence parameters by enclosing them in curly brackets, for example {current_temp}
would output the value of the sequence parameter current_temp.
Return values
If the webhook will return data in the JSON format, you can capture the values here. Name each value here, in a comma separated list, for example date
, time
, minutes
.
Return value names can include only letters, numbers and underscores.
You can references these in other steps by enclosing the name in curly brackets, for example {date}
, {time}
or {minutes}
.
Alternatively, if you want to use the JSON structure to name your parameters select the use JSON structure checkbox.
When processing, the JSON is flattened and the parent keys are joined together using a hyphen. Considering the example JSON below:
{
"Student": {
"FirstName":"Harry",
"Surname":"Potter"
},
"School":"Hogwarts",
"House":"Gryffindor"
}
You can access the student's last name in your sequence using {Student-Surname}
and the school using {School}
.