Alert webhooks

Efento Cloud allows you to use alert webhooks as a notification method for your rules.

Before You Start

To configure and use Efento Cloud webhooks, you’ll need the following:

  • An application capable of receiving incoming webhooks, parsing their content, and responding with a 201 status code to each received message.

  • An Efento Cloud account with Administrator permissions for the selected organisation.

Create a new webhook integrations

1

1. Create a New Webhook

  1. In the left-hand menu, go to Settings (gear icon) → Organization settings.

  2. Navigate to the Integrations tab.

  3. In the Webhook section, click Add Webhook.

  4. Enter the Webhook name and URL.

    • (Optional) To use custom headers for webhooks sent by Efento Cloud, check Use custom headers and add the desired header names and values (up to 5 headers).

  5. Click Test connection.

    • If the setup is correct, a ✅ checkmark will appear next to the button.

    • If the test fails, verify that:

      • The webhook URL is correct.

      • All required headers are properly configured.

      • Your application responds with the correct HTTP status code (201).

  6. Once successful, click Add Webhook to save your configuration.

2

Enable Webhooks for Selected Rule(s)

  1. Go to Settings (gear icon) → Rules and notifications.

  2. Select or create a rule, configure its parameters, and click Next.

  3. Choose the sensors or locations the rule will apply to, then click Next.

  4. In the Notifications section, click Connect integration.

  5. From the Integration dropdown, select Webhook, then choose the name of the webhook integration you created earlier.

  6. Click Connect Integration and save your changes.

Once configured, any time the rule is triggered, Efento Cloud will automatically send a webhook notification to your specified URL.

You can reuse a single webhook integration across multiple rules. Simply assign the same connection to different rules — when any of them is triggered, the same webhook endpoint will receive the notification.

Payload

Efento Cloud sends the alerts as JSON using the POST method. The alert webhook is triggered twice:

  1. when the alarm rule is activated - the rule’s condition is met (e.g. temperature crossed the threshold),

  2. when the alarm rule is deactivated - the rule’s condition is not active anymore (e.g. temperature got back to the safe range).

The JSON contains:

  • Timestamp when the alert was created (condition of the rule was met)

  • Timestamp when the alert was revoked

  • Organization and location names

  • Rule information (name, condition, parameter, threshold value)

  • Measurement point information (name and serial number of the sensor assigned to it along with the channel)

  • Value of the measurement that triggered the alert and value of the measurement that revoked the alert

JSON is structured as below:

createdAt
Timestamp (UTC) when the alert was triggered (e.g. measurement received by the platform was over the threshold; sensor was lost)

neutralizedAt

Timestamp (UTC) when the alert was deactivated (e.g. measurement received by the platform got back below the threshold; sensor started sending the data to the platform again). If the webhook was triggered by meeting the rule’s condition, this field has ‘null’ value.

organizationName

Name of the Organisation in Efento Cloud in which the rule is configured

locationName

Name of the location in which the measurement point is located

ruleName

Name of the rule in Efento Cloud

ruleCondition

Rule condition. Available values: - more_than - measured value is over the set threshold - less_than - measured value is below the set threshold - occurred - binary sensor changed its state or low battery / lost rule condition is met

ruleParameters

Type of the measurement. Available values: TEMPERATURE, HUMIDITY, ATMOSPHERIC_PRESSURE, DIFFERENTIAL_PRESSURE, ALARM, WATER_METER, ELECTRICITY_METER, PULSE_COUNTER, LOST, LOW_BATTERY, IAQ, FLOODING, SOIL_MOISTURE, CO_GAS, NO2_GAS, H2S_GAS, AMBIENT_LIGHT, PM_1_0, PM_2_5, PM_10_0, NOISE_LEVEL, CH4_GAS, NH3_GAS, HIGH_PRESSURE, DISTANCE_MM, WATER_METER_ACCUMULATIVE, CO2_GAS, STATIC_IAQ, CO2_EQUIVALENT, BREATH_VOC, PERCENTAGE, VOLTAGE, CURRENT, PULSE_COUNTER_ACCUMULATIVE, ELECTRICITY_METER_ACCUMULATIVE

ruleType

Type of the rule. Available values: LOST_MEASUREMENT_POINTS, LOW_BATTERY_MEASUREMENT_POINTS, MEASUREMENT_MEASUREMENT_POINTS, LOST_GATEWAYS, POWER_SUPPLY_SOURCE_CHANGE_GATEWAYS, LOW_BATTERY_GATEWAYS

deviceSerialNumber

Serial number of the sensor assigned to the measurement point

webhookReminderCounter

This field shows the number of times a webhook has been repeated. If webhook repetition was enabled during rule configuration, this value increases with each repetition.

alertId

Unique ID of an alert

resourceInfo

Details about the measurement point / gateway that triggered the rule. id - unique identifier of the measurement point / gateway in Efento Cloud, name - name of the measurement point / gateway in Efento Cloud, type - type of the device - sensor (MEASUREMENT_POINT) or gateway (GATEWAY).

details

This section details alarm information, including the channel number of the measurement point that triggered the alarm(channelNumber), the measurement value that triggered it (triggeringMeasurement), the threshold value (thresholdValue), and the measurement value that revoked the alarm (if the webhook was triggered by meeting the rule’s condition, this field has ‘null’ value (revokingMeasurement).

Efento Cloud accepts responses with response code 2XX (e.g. 200, 201). All the other response codes are invalid.

Limitations

There are few limitations that should be considered when using the alert webhooks:

  • Multiple webhooks can be assigned to a single alert rule.

  • A single webhook can be utilized across multiple alarm rules.

  • The application, to which Efento Cloud sends the data, needs to respond within 10 seconds from the moment when the webhook was triggered

  • Efento Cloud does not resend the alerts. If the application that receives the data was not responding the data will not be resent and needs to be pulled using Efento Cloud API

  • The only accepted response codes, confirming that the measurements were received are 2XX codes (200, 201, etc.). If Efento Cloud receives an invalid response code five times in the row, the alert webhook will be disabled and has to be manually enabled by the user in Efento Cloud.

  • The maximum URL length is 500 characters, including the mandatory “http://” or “https://” prefixes

  • It is possible to configure up to five custom headers per webhook

  • It is impossible to change the structure of the payload (JSON) sent

Last updated