Trigger Email alert
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 |
---|---|---|---|---|
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 ) | enum-multi | No | |
to_email | Recipient email address. Conditional on enabled being true. | 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? | 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. Conditional on use_custom_smtp_server being true. | string | null | Yes |
password | Your SMTP server must support the AUTH SMTP connection to use this. 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 |
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 |
Updated 11 days ago