Trigger Notification
Send an e-mail or push notification when a trigger condition is met.
Overview
The node sends an Notification via Email or Push when a trigger condition is met. It can also send a link to live stream, attach a snapshot as well as any Clips saved Locally using Save Clip Node.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : None
Properties
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
send_mode | How notifications are delivered. Default sends via Lumeo's managed notification service, where recipients and delivery channels (email/push) are configured in your Lumeo account. Direct lets you specify recipient email addresses and your own SMTP server, and choose channels per node. | enum | default | Yes |
trigger | Send a notification when this condition evaluates to true. The trigger expression must be a valid Dot-notation expression that operates on Pipeline Metadata and evaluates to True or False. See details here. ex. nodes.annotate_line_counter1.lines.line1.total_objects_crossed_delta > 0 | trigger-condition | null | Yes |
enabled | Notifications Enabled | bool | true | No |
notification_type | Comma separated list of notification types. Options: Email Notification (email), Push Notification (push). Only used in Direct send mode. | enum-multi | No | |
to_email | Recipient email address. Only used in Direct send mode. | string | null | Yes |
subject | Subject or Title of the notification. See below for details on template variables. | text | "Event triggered on {{ source_name }}" | Yes |
body | Body of the notification. See below for details on template variables. | text | null | No |
include_snapshot | Attach a snapshot from the trigger time. | bool | true | No |
snapshot_object_types | Select the object types to include in the snapshot. If not specified, entire frame will be sent. Conditional on include_snapshot being true. Ex person.missing_ppe | model-label | null | No |
media_node | Attaches media from the specified node with the email. Specifying a Save Clip node will include the most recent clip from the node with the email and also upload it to the cloud if push notifications are enabled. The Save Clip node must be configured to store clips locally. | node | null | No |
livestream_node | Enables including the live stream URL from the named WebRTC node with the email using livestream_url template variable. | node | null | No |
use_custom_smtp_server | Use your own SMTP Server? Only used in Direct send mode. | bool | false | No |
server | SMTP server IP address. Conditional on use_custom_smtp_server being true. | string | null | Yes |
port | Port of the SMTP Server. Conditional on use_custom_smtp_server being true. | number | null | Yes |
use_tls | If enabled, a TLS socket will be used for the SMTP session. Your SMTP server must support the STARTTLS SMTP extension to use this. Conditional on use_custom_smtp_server being true. | bool | true | No |
from_email | "From" email address. Conditional on use_custom_smtp_server being true. | string | null | Yes |
user | SMTP user. Optional; leave blank to send without SMTP AUTH. Conditional on use_custom_smtp_server being true. | string | null | No |
password | SMTP password. Optional; leave blank to send without SMTP AUTH. Conditional on use_custom_smtp_server being true. | string | null | No |
interval | Min. time between consecutive notifications (seconds) | float | 10 | No |
max_media_wait_time | Max. time to wait until a media clip is available (seconds) | float | 10 | No |
media_extensions | Comma separated list of media extensions to attach when a Media node is specified. For example, 'mp4,jpg,png,gif'. | string | "mp4" | No |
Send Modes
- Default — Notifications are emitted to Lumeo's managed notification service. Recipients and delivery channels (email and/or push) are configured in your Lumeo account, so the recipient email and SMTP server options are hidden. Snapshots and clips are uploaded to Lumeo Files and attached by reference: when both a clip and a snapshot are present, the snapshot is set as the clip's thumbnail and only the clip is attached; otherwise the snapshot is attached on its own. This is the recommended mode for new nodes.
- Direct — The node delivers notifications itself: it sends email (via Lumeo's hosted relay or your own SMTP server) and/or push notifications based on the
notification_typeselection, to the recipients listed into_email.
Template Syntax
The following Template variables are available to use in Email Subject and Body. The templates can be built using Jinja2 Template Syntax.
Variables available to the template:
| Variable | Description |
|---|---|
meta | Frame metadata. Contains keys like nodes, objects, and other custom metadata inserted by Custom function node. |
application_id | The application ID of the deployment that produced this metadata. |
application_name | The application name of the deployment that produced this metadata. |
deployment_id | The deployment ID of the deployment that produced this metadata. |
deployment_name | The deployment name of the deployment that produced this metadata. |
source_name | The name of the source that produced this metadata. |
livestream_url | The URL of the livestream. |
event_name | Name of event(s) contained in this frame. |
event_description | Description of events contained in this frame. |
Example templates
Static text content:
Text content
Reference specific metadata:
Person detected on {{ source_name }}. View live stream at {{ livestream_url }}
Metadata reinserted as is:
{{ meta | tojson }}
Metadata
| Metadata Property | Description |
|---|---|
| None | None |
