Required permission:
- View automation
- Create automation
Constraints
- One alert type per automation. The automation watches exactly one Alert type. To react to several types, add one trigger per type.
- Three actions. Create Task, Webhook and Notification by Email. WhatsApp and SMS are not offered on alert events.
- No rules. The alert type is the automation’s only scope.
- Saved in an automation group. Alert events are set up on the automation group canvas. They can’t be created through
POST /automation.
Alert types
An alert type switched off in Alert Setting is never raised, so it never runs this event.
When it runs
- A detector or the field app raises an alert, for example a driver presses the panic button.
- The alert is saved and appears in Monitoring › Alert.
- Every active automation whose Alert type matches the alert’s code runs its action.
- Repeats. While a driver keeps overspeeding, or a battery stays low, the alert is raised again with Repeated set. Only the first alert runs the event.
- Alerts raised by an automation. An alert from the Alert action (
automation.alert) never starts an alert event, so automations can’t trigger each other in a loop. - Other codes. Only the eight alert types above can be chosen.
Set it up
- Open Workflow › Automation and create or open an automation group.
- In Add first step, under Alert, pick On Alert Created.
- Alert type: required. Pick the one type to watch, for example Device: Low battery.
- Click + under the trigger and pick an action in Add Automation:
- Create Task: pick the flow and the Hub, then fill each task field with a value or an alert field from the search button.
- Webhook: fill in the URL and any headers.
- Notification: the channel is Email. The alert’s user is also sent the email, on top of the recipients you choose.
- Click Save, and switch the group on.
Alert fields
The same fields fill a Create Task mapping, an email’s variables and the webhook body. In the app they show by their label; the key is what a webhook receives.
The webhook body also carries
docId (the alert’s ID) and organizationId.
Each alert type adds its own details under data. In the app they are labelled Data …, for example Data Driver Name:
A field the alert did not record is empty.
Webhook payload
An example for Device: Low battery:Troubleshooting
The event never runs.- Check that the automation group is switched on.
- Check the trigger’s Alert type is the type that was raised.
- The alert type may be switched off in Alert Setting, so no alert was raised. Check Monitoring › Alert.
- A repeat of an alert that is already open does not run the event.