Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/cli/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,9 @@ Trigger configs support the following event types:
- `conditional_data_ingested`: fires when data ingested by a specific data capture method matches a condition.
- `conditional_logs_ingested`: fires when logs at the specified levels are ingested.

Each trigger requires `notifications`, an array of objects with `type` (`email` or `webhook`), `value`, and `seconds_between_notifications`.
Each trigger requires `notifications`, an array of objects with `type` (`email`, `webhook`, or `push`), `value`, and `seconds_between_notifications`.
For push notifications, also include `application`: use `com.viam.viammobile` for the Viam mobile app, or a custom application ID for which you have uploaded Firebase credentials with [`organizations firebase-config set`](#organizations-firebase-config-set).
The recipient in `value` must be a machine owner or operator who has accepted push notification permissions.

```sh {class="command-line" data-prompt="$"}
# launch the interactive trigger builder
Expand Down
2 changes: 1 addition & 1 deletion docs/data/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ See [Tag data](/data/tag-data/), [Create a dataset](/train/create-a-dataset/), a

## Monitor and debug

Triggers send webhooks or email alerts when synced data meets a condition, so you can respond to events like temperature spikes or detection results without polling.
Triggers send webhooks, email alerts, or push notifications when synced data meets a condition, so you can respond to events like temperature spikes or detection results without polling.

Monitoring dashboards can be built with Viam's Teleop workspace or with Grafana connected to your data through MongoDB.

Expand Down
16 changes: 12 additions & 4 deletions docs/data/trigger-on-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ title: "Trigger on data events"
weight: 55
layout: "docs"
type: "docs"
description: "Use triggers to send email notifications or webhook requests when data from the machine is synced."
description: "Use triggers to send email, webhook, or push notifications when data from the machine is synced."
date: "2025-09-12"
aliases:
---

Get alerted when your robot's data meets a condition. Triggers send webhooks or email notifications when events occur on a machine, so you can respond to temperature spikes, low battery, detection results, or connectivity changes without polling.
Get alerted when your robot's data meets a condition. Triggers send webhooks, email notifications, or push notifications to a mobile app when events occur on a machine, so you can respond to temperature spikes, low battery, detection results, or connectivity changes without polling.

Triggers are configured in the machine's config and are scoped to that machine. Each trigger fires when its event occurs on the specific machine it is configured on.

Expand Down Expand Up @@ -59,7 +59,7 @@ For the full attribute reference for all trigger types, see [Trigger configurati
For a full reference of trigger configuration attributes, see [Trigger configuration](/reference/triggers/).

1. Next, configure what should happen when an event occurs.
You can add **Webhooks** and **Email** notifications:
You can add **Webhooks**, **Email**, and **Push** notifications:

To add a webhook:

Expand All @@ -79,6 +79,14 @@ For the full attribute reference for all trigger types, see [Trigger configurati
1. Toggle **Email all machine owners** on.
1. Set the alert frequency (minimum time between notifications).

To add a push notification:

1. Click **Add push notifications**.
1. Choose the target mobile app (Viam mobile or a custom app ID).
1. Add specific email addresses of recipients who should receive push notifications, or toggle on notifications for all machine owners.
Recipients must be machine owners or operators.
1. Set the alert frequency (minimum time between notifications).

{{% /tab %}}
{{% tab name="JSON Example" %}}

Expand Down Expand Up @@ -153,7 +161,7 @@ When a trigger fires and sends a webhook, the HTTP request includes identifying

For the full header and body reference, see [Webhook attributes](/reference/triggers/#webhook-attributes). For example cloud functions that process the payload, see [Example cloud function](/reference/triggers/#example-cloud-function).

## Notification frequency
## Notification interval

The `seconds_between_notifications` field sets the minimum time between notifications for the same trigger. If a trigger fires more frequently than this interval, additional notifications are suppressed until the interval has elapsed. To avoid floods of notifications, set the interval to a value appropriate for your use case (for example, 3600 to allow at most one alert per hour). For `conditional_logs_ingested` triggers, the check interval is always one hour regardless of this setting.

Expand Down
8 changes: 5 additions & 3 deletions docs/monitor/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Set up alerts"
weight: 20
layout: "docs"
type: "docs"
description: "Configure triggers to receive email or webhook notifications when machines need attention."
description: "Configure triggers to receive email, webhook, or push notifications when machines need attention."
aliases:
- /manage/troubleshoot/alert/
- /build/configure/webhooks/
Expand All @@ -15,7 +15,7 @@ aliases:
- /services/data/capture/performance-metrics/
---

Configure triggers to receive email or webhook notifications when your machines need attention. Triggers fire when specific events occur, such as a sensor reading crossing a threshold, a machine going offline, or error logs appearing.
Configure triggers to receive email, webhook, or push notifications when your machines need attention. Triggers fire when specific events occur, such as a sensor reading crossing a threshold, a machine going offline, or error logs appearing.

## Types of alerts

Expand Down Expand Up @@ -102,6 +102,8 @@ Wait a minute for data to capture and sync, then refresh.
- **Email all machine owners**: toggle on, set alert frequency.
- **Webhook**: click **Add Webhook**, enter your cloud function URL, set alert frequency.
See [Trigger configuration](/reference/triggers/#webhook-attributes) for webhook payload details.
- **Push notifications**: click **Add push notifications**, choose the target mobile app, add recipient email addresses or enable notifications for all machine owners, and set alert frequency.
Recipients must be machine owners or operators.
1. Click **Save**.

{{% /tab %}}
Expand Down Expand Up @@ -191,7 +193,7 @@ Viam checks for matching logs once per hour.
1. Enter a name and click **Create**.
1. Select **Conditional logs ingestion** as the trigger **Type**.
1. Select the log levels to alert on: **Error**, **Warn**, or **Info**.
1. Add notification methods (email or webhook) and set the alert frequency.
1. Add notification methods (email, webhook, or push notification) and set the alert frequency.
1. Click **Save**.

{{% /tab %}}
Expand Down
2 changes: 1 addition & 1 deletion docs/monitor/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ To find the machine ID, click the **...** menu on the machine's page and select

## Set up offline alerts

To receive an email or webhook notification when a machine goes offline, configure a trigger.
To receive an email, webhook, or push notification when a machine goes offline, configure a trigger.
See [Set up alerts](/monitor/alert/).

## Use the mobile app
Expand Down
4 changes: 2 additions & 2 deletions docs/monitor/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ See [Data dashboards](/monitor/dashboards/overview/).

## Set up alerts

Triggers send email or webhook notifications when specific events occur on your machines:
Triggers send email, webhook, or push notifications when specific events occur on your machines:

- **Telemetry thresholds**: alert when a sensor reading (CPU usage, temperature, battery level) crosses a threshold.
- **Machine status**: alert when a machine part comes online or goes offline.
- **Log levels**: alert when error, warning, or info logs appear on a machine.

You configure the alert frequency to control how often alerts fire, which helps prevent alert fatigue as your fleet grows. Notifications can go to specific email addresses, all machine owners, or a webhook endpoint that integrates with services like PagerDuty, Twilio, or Zapier.
You configure the alert frequency to control how often alerts fire, which helps prevent alert fatigue as your fleet grows. Notifications can go to specific email addresses, all machine owners, a webhook endpoint that integrates with services like PagerDuty, Twilio, or Zapier, or a push notification to the Viam mobile app or your own custom mobile app.

For alerts based on data sync events, see [Trigger on data events](/data/trigger-on-data/). For alerts based on ML model detections, see [Alert on detections](/vision/object-detection/alert-on-detections/).

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/glossary/trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
title: Trigger
id: trigger
full_link: /data-ai/reference/triggers-configuration/
short_description: A mechanism that sends alerts by email or webhook when specific events occur in your machine or data.
short_description: A mechanism that sends alerts by email, webhook, or push notification when specific events occur in your machine or data.
aliases:
- /dev/reference/glossary/trigger/
---

A trigger is a mechanism that sends alerts by email or webhook when specific events occur in your machine or data.
A trigger is a mechanism that sends alerts by email, webhook, or push notification when specific events occur in your machine or data.

Triggers can alert you when the following events occur:

Expand Down
16 changes: 8 additions & 8 deletions docs/reference/triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ title: "Trigger configuration"
linkTitle: "Trigger configuration"
weight: 60
type: "docs"
tags: ["data management", "trigger", "webhook"]
description: "Detailed information about how to configure triggers and webhooks."
tags: ["data management", "trigger", "webhook", "push notification"]
description: "Detailed information about how to configure triggers, webhooks, and push notifications."
date: "2025-05-05"
updated: "2025-09-18"
aliases:
- /data-ai/reference/triggers-configuration/
- /reference/configuration/triggers/
---

Triggers can alert you by email or webhook when any of the following events occur:
Triggers can alert you by email, webhook, or push notification when any of the following events occur:

- [Machine telemetry data syncs from your local device to the Viam cloud](/monitor/alert/)
- [Data syncs from a machine](/data/trigger-on-data/)
Expand All @@ -37,8 +37,8 @@ The following template demonstrates the structure of a JSON configuration for a
},
"notifications": [
{
"type": "<webhook|email>",
"value": "<webhook URL or email address or all_machine_owners>",
"type": "<webhook|email|push>",
"value": "<webhook URL, email address, or all_machine_owners>",
"seconds_between_notifications": <number of seconds>
}
]
Expand All @@ -62,8 +62,8 @@ The following template demonstrates the structure of a JSON configuration for a
},
"notifications": [
{
"type": "<webhook|email>",
"value": "<webhook URL or email address or all_machine_owners>",
"type": "<webhook|email|push>",
"value": "<webhook URL, email address, or all_machine_owners>",
"seconds_between_notifications": <number of seconds>
}
]
Expand Down Expand Up @@ -137,7 +137,7 @@ Triggers support the following attributes:
| ---- | ---- | --------- | ----------- |
| `name` | string | **Required** | The name of the trigger |
| `event` | object | **Required** | The trigger event object, which contains the following fields: <ul><li>`type`: The type of the event to trigger on. Options: <ul><li>`part_data_ingested`: fire when data syncs</li> <li>`conditional_data_ingested`: fire when data that meets a certain condition syncs</li> <li>`part_online`: fire when the part is online</li> <li>`part_offline`: fire when the part is offline</li> <li>`conditional_logs_ingested`: check every hour and fire if logs of the specified log level are present</li></ul></li><li>`data_types`: Required with `type` `part_data_ingested`. An array of data types that trigger the event. Options: `binary`, `tabular`, `file`, `unspecified`. </li><li> `conditional`: Required when `type` is `conditional_data_ingested`. For more information about this field, see [Conditional attributes](/reference/triggers/#conditional-attributes). </li><li> `log_levels`: Required when `type` is `conditional_logs_ingested`. An array of log levels. Options: `error`, `warn`, `info`. </li></ul> |
| `notifications` | object | **Required** | The notifications object, which contains the following fields: <ul><li>`type`: The type of the notification. Options: `webhook`, `email`</li><li>`value`: The URL to send the request to, the email address to notify, or `all_machine_owners` to notify all machine owners.</li><li>`seconds_between_notifications`: The interval between notifications in seconds. This field is ignored for event type `conditional_logs_ingested` where the interval is always one hour.</li></ul> For more information on webhooks, see [Webhook attributes](#webhook-attributes). |
| `notifications` | object | **Required** | The notifications object, which contains the following fields: <ul><li>`type`: The type of the notification. Options: `webhook`, `email`, `push`</li><li>`value`: The URL to send the request to, the email address to notify, or `all_machine_owners` to notify all machine owners.</li><li>`seconds_between_notifications`: The interval between notifications in seconds. This field is ignored for event type `conditional_logs_ingested` where the interval is always one hour.</li><li>`application`: Required when `type` is `push`. The application ID for push notifications. Use `com.viam.viammobile` for the Viam mobile app, or provide your own custom application ID. To use a custom application ID, you must first upload your Firebase credentials to Viam with the [`organizations firebase-config set`](/cli/reference/#organizations-firebase-config-set) CLI command.</li></ul> For more information on webhooks, see [Webhook attributes](#webhook-attributes). For push notifications, the recipient specified in `value` must be a machine owner or operator, and the recipient must have accepted push notification permissions for the application. |
| `notes` | string | Optional | Descriptive text to document the purpose, configuration details, or other important information about this trigger. |

## Conditional attributes
Expand Down
2 changes: 1 addition & 1 deletion docs/vision/classify.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,4 @@ If you need the image and its classifications together in one call, use [`Captur

- [Detect objects](/vision/object-detection/detect/): get per-object bounding boxes instead of whole-image labels.
- [Track objects across frames](/vision/object-detection/track/): maintain object identities across consecutive frames.
- [Alert on detections](/vision/object-detection/alert-on-detections/): send email or webhook notifications when specific objects or labels are detected.
- [Alert on detections](/vision/object-detection/alert-on-detections/): send email, webhook, or push notifications when specific objects or labels are detected.
2 changes: 1 addition & 1 deletion docs/vision/object-detection/act-on-detections.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,6 @@ If your module wraps another resource, update any services or processes that ref

## What's next

- [Alert on detections](/vision/object-detection/alert-on-detections/): send email or webhook notifications when specific objects are detected.
- [Alert on detections](/vision/object-detection/alert-on-detections/): send email, webhook, or push notifications when specific objects are detected.
- [Deploy a module](/build-modules/deploy-a-module/): package and upload your module to the Viam [registry](https://app.viam.com/registry).
- [Vision service API](/reference/apis/services/vision/): full API documentation for detections, classifications, and more.
10 changes: 5 additions & 5 deletions docs/vision/object-detection/alert-on-detections.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Alert on detections"
weight: 60
layout: "docs"
type: "docs"
description: "Send email or webhook alerts when your vision service detects specific objects or classifications."
description: "Send email, webhook, or push notification alerts when your vision service detects specific objects or classifications."
aliases:
- /vision/alert/
- /vision/how-to/alert-on-detections/
Expand All @@ -13,7 +13,7 @@ aliases:
date: "2026-04-14"
---

You want to be notified when your camera detects something specific: a person in a restricted area, a missing hard hat, or an anomaly on a production line. This guide shows you how to connect your vision service to Viam's trigger system so you receive an email or webhook whenever a detection occurs. No custom code is required.
You want to be notified when your camera detects something specific: a person in a restricted area, a missing hard hat, or an anomaly on a production line. This guide shows you how to connect your vision service to Viam's trigger system so you receive an email, webhook, or push notification whenever a detection occurs. No custom code is required.

## Concepts

Expand All @@ -23,7 +23,7 @@ The alert system chains three resources together:

1. **Filtered camera**: a camera module that only passes images to the data management service when specific detections or classifications are present.
2. **Data management service**: captures images from the filtered camera and syncs them to the Viam cloud.
3. **Trigger**: fires when new data syncs, sending an email or webhook notification.
3. **Trigger**: fires when new data syncs, sending an email, webhook, or push notification.

Because the filtered camera only passes images that match your criteria, every synced image represents a detection event. The trigger fires on each sync, turning data events into alerts.

Expand Down Expand Up @@ -145,7 +145,7 @@ Before trying the end-to-end flow, confirm you have all three pieces from above
1. Point your camera at an object your model recognizes and wait for the capture interval to pass.
2. Check the **TEST** panel on your vision service to confirm detections are occurring with sufficient confidence.
3. Navigate to the **DATA** tab and verify that images are syncing.
4. Check your email or webhook endpoint for the alert.
4. Check your email, webhook endpoint, or mobile app for the alert.

## Troubleshooting

Expand All @@ -171,7 +171,7 @@ Before trying the end-to-end flow, confirm you have all three pieces from above

- Confirm the trigger is configured with **Data has been synced to the cloud** as the type.
- Check that **Binary (image)** is selected as the data type.
- Verify that at least one notification method (email or webhook) is configured.
- Verify that at least one notification method (email, webhook, or push notification) is configured.

{{< /expand >}}

Expand Down
Loading