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

PropertyDescriptionTypeDefaultRequired
triggerSend 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 > 0trigger-conditionnullYes
enabledNotifications EnabledbooltrueNo
notification_typeComma separated list of notification types. Options: Email Notification (email), Push Notification (push)enum-multiemailNo
to_emailRecipient email address. Conditional on enabled being true.stringnullYes
subjectSubject or Title of the notification. See below for details on template variables.text"Event triggered on {{ source_name }}"Yes
bodyBody of the notification. See below for details on template variables.textnullNo
include_snapshotAttach a snapshot from the trigger time.booltrueNo
snapshot_object_typesSelect 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_ppemodel-labelnullNo
media_nodeAttaches 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.nodenullNo
livestream_nodeEnables including the live stream URL from the named WebRTC node with the email using livestream_url template variable.nodenullNo
use_custom_smtp_serverUse your own SMTP Server?boolfalseNo
serverSMTP server IP address. Conditional on use_custom_smtp_server being true.stringnullYes
portPort of the SMTP Server. Conditional on use_custom_smtp_server being true.numbernullYes
use_tlsIf 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.booltrueNo
from_email"From" email address. Conditional on use_custom_smtp_server being true.stringnullYes
userSMTP user. Conditional on use_custom_smtp_server being true.stringnullYes
passwordYour SMTP server must support the AUTH SMTP connection to use this. Conditional on use_custom_smtp_server being true.stringnullNo
intervalMin. time between consecutive notifications (seconds)float10No
max_media_wait_timeMax. time to wait until a media clip is available (seconds)float10No
media_extensionsComma 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:

VariableDescription
metaFrame metadata. Contains keys like nodes, objects, and other custom metadata inserted by Custom function node.
application_idThe application ID of the deployment that produced this metadata.
application_nameThe application name of the deployment that produced this metadata.
deployment_idThe deployment ID of the deployment that produced this metadata.
deployment_nameThe deployment name of the deployment that produced this metadata.
source_nameThe name of the source that produced this metadata.
livestream_urlThe URL of the livestream.
event_nameName of event(s) contained in this frame.
event_descriptionDescription 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 PropertyDescription
NoneNone