In all cases, you can either associate already created email notifications, custom functions, and webhook actions or create new ones. To associate actions, they must be grouped under the specific category (alarm rules, notification profiles, or workflow rules) during creation. For example, if you create an email notification action, you need to select the category "Workflow" so it appears in the list of available actions to be associated with a workflow.
Alernatively, you can create the actions within the
alarm rule,
notification profile, or
workflow feature itself. In this case, you need not specify the category as you are creating the actions from within the feature which also denotes the category.
This document provides insights into the various actions available in the application, including email notifications, webhooks, and custom functions.
Email Notification
Email notifications are typically triggered by various events or conditions related to the
devices, or
assets, in general the data being monitored. Some of the scenarios when emails are triggered from the application are provided below.
- Threshold breaches: When the application condition detects a value (e.g., temperature, humidity, pressure, or fuel level) that exceeds or falls below a predefined threshold.
- Critical device failures: If a device malfunctions or fails, triggering an alarm that requires immediate attention.
- Device connectivity issues: Alerts when a device goes offline, loses connectivity, or fails to report data for a certain period.
- Scheduled and service alerts: Reminders for upcoming maintenance tasks or inspections based on usage hours, time intervals, or specific conditions.
The scenarios and conditions may vary based on your IoT network setup and requirements. In addition to specifying the condition, you need to configure the recipient details for the notifications.
Webhooks
Webhooks in Zoho IOT facilitate communication with third-party applications by sending instant web notifications whenever a specific event occurs. With Webhooks, you can configure HTTP URLs to automate the entire notification process. For general information about Webhooks, please refer to webhooks.org.
For example, let's say you have a third-party application that needs to be notified when the temperature sensor in the IoT application records a reading above a certain threshold. You can set up a webhook in Zoho IOT that specifies the URL of the third-party application's endpoint to receive notifications. Whenever the temperature sensor's reading exceeds the threshold, Zoho IOT will trigger the webhook and send an HTTP POST request to the specified URL with the data about the event.
Below are some of the scenarios in which Webhook actions are used.
- In an IIoT setup, when the DG generator fuel level is alarmingly low, a webhook action can be triggered to push the fuel reading to a third-party application to initiate purchase order etc.
- In a BMS setup, you can push the air quality reading to a third party application to send mail to the concerned supervisor.
- In Energy Monitoring setup, energy consumption readings can be pushed to initiate the payment procedure for energy consumed via third-party application.
Webhook Parameters
The following table lists the parameters in webhook:
Field Name
| Description
|
Name
| The unique name of the webhook.
|
Description
|
A short description about the webhook.
|
Method
|
The type of the API method - POST or GET.
Choosing POST allows you to enter the values in the fields of the associated application, whereas GET allows you to retrieve information to update in the fields of a record in Zoho IOT.
Note: By default, the system will select the POST method.
|
|
URL to Notify
|
The REST API URL of the third-party application.
|
|
Authentication Type
|
The desired Authorization type: General( includes API Key or AUTH Token) and Connection(OAuth, API Key, etc.).
|
Connection
|
The connection for the webhook.
Note: The connection option will only list the existing active connections. Either choose an existing connection or add a new one.
|
|
Header
|
The information section in a webhook URL is typically classified as Header and Body.
Parameters added to the header section will have data that will synchronize with the header of other applications. In addition to the trigger information, header can customarily carry API Keys/Auth tokens. To form the Header URL parameters, choose the module parameters and/or custom parameters.
|
|
Module Parameters
|
The name, type, and corresponding value.
Multiple parameters are added to build the string. This format is dynamic, and the IoT application gives you the options to choose the field values from the picklist.
Parameter Types are: Zoho IOT Modules, Datapoints, and Alarms.
|
|
Custom Parameters
|
The name and corresponding value.
The value in custom parameter is static, this key/value pair is mainly used to send the auth tokens, security tokens, API key, and so on.
|
|
User Defined Parameter
| The parameter name and the parameter value. This format is also dynamic, with the ability to choose the type of value by including the variable as a placeholder using #.
|
Body
|
The body part of the URL containing information in the URL string about the trigger to other applications. You can choose to use None, Form-Data, or Raw Data from the picklist to configure the body part of the URL.
Form-Data: Allows you to build the body part of the URL by simply appending together, parameter name, and parameter type, or parameter value. You can build Form-Data in three ways: using module parameters, custom parameters, and user-defined parameters.
Raw Data: Apart from forming the parameters, you can also write your own data values in the text editor if you select the option Raw Data as body type. You can input data in either of the following formats Text or JSON. You can also use the # merge field feature to denote a field value within the script.
|
Preview URL
|
The preview URL displays the complete webhook URL for the GET and DELETE request method, while for the POST and PUT method, only the configured URL is displayed.
To preview the URL, Click the Refresh icon in the bottom of the text editor. You can also copy the URL.
|
Custom Functions
Custom Functions in Zoho IoT enable you to write your own business logic using Deluge code, allowing you to tailor actions to your specific needs. These functions can be linked to Email Notifications, Workflows, or Notification Profiles, ensuring they are executed automatically when predefined conditions are met.
See Also