Ubidots Event
Last updated
Last updated
To trigger an UbiFunction via Ubidots' Events Engine, follow these steps:
To begin, create a new event from the "Events" section in the "Data" tab in your Ubidots Navbar.
Next, configure the Event logic using Ubidots’ “ANDs” / “ORs” operators.
For additional details on how to configure conditional and complex Event triggers, check out our Creating Conditional Events and Alerts user guide.
With the "Triggers" event logic configured, it is now time to create the action – in this case calling an UbiFunction:
Step 1. Select the "UbiFunction" action
Step 2. Select the method to trigger the UbiFunction: GET or POST. The UbiFunction must have the same method configuration. NOTE: when choosing GET, the default “Content-Type: application/json” will disappear.
Step 3. Search for and select the UbiFunction in the dropdown menu.
Step 4. Add the desired headers. POST requests will require the default “Content-Type: application/json” header.
Step 5. Customize the “Active trigger” and the “Back to normal” messages. NOTE: These fields always expect a JSON object. When the HTTP method is GET, the JSON is automatically converted to query parameters and appended to the UbiFunction URL.
Step 6. Name the Event, set the active days and hours, and save.
Your UbiFunction will now be triggered when your Event is triggered.