Webhook component is used for interfacing with external HTTP APIs when rule is triggered. Standard HTTP features such as the request method, headers, and request body are all supported.
Check out how you can send custom text from AllThingsTalk Maker to your Twitter.
- Component name is shown for convenience.
- Shrink / Expand toggles the size of the component. Shrinking components lets you create more space on the screen and presents you the whole rule at a glance.
- View docs will always get you to this page.
- Remove component removes the device from the list of triggers.
- HTTP Method lets you choose between GET, POST (the default), and PUT. When POST and PUT are selected, it’s possible to provide the request body as well.
- URL of the remote HTTP API to which the request will be sent.
- HTTP Headers which will be sent with the request. You can add additional headers using + ADD HEADER. There’s no limit to how many you can have. For the exact headers needed, please consult the docs of the remote API you’re connecting to.
- Request body is a plain text that will be sent with the request. Keep in mind that this isn’t stopping you from sending JSON - just set the “Content-Type” header to “application/json”, and write your JSON structure.
- Dynamic data such as an asset’s state can be inserted into the request body after clicking the + icon.
A list with all devices in the ground is shown, along with all of their assets and their metadata (Device title). After selecting an item from the list, it is inserted into the message as follows.
This makes a binding to Temperature asset’s state inside the message, so that whenever the rule is executed, Temperature is replaced with the actual current value of that asset. The final message depends on the temperature, and may look like
Current temperature is 23°C.
Current temperature is -5.2°C.
Because bindings are just 0, you’re free to write them manually as well.
Actions area is still available for you to drag additional actions to the rule. When more than one action is included in the rule, all actions are executed when the rule is triggered.