Create a custom trigger email or SMS message
Build your own custom email messages and SMS alerts for your active triggers. Keep it simple or add custom HTML, images, links, and more to your email message template. Create separate SMS messages that are optimized for mobile devices with the information you need.
Message Template Basics
Step 1: Click on the data bucket settings link in your bucket shelf and select the Triggers tab at the top. Click +Create New Trigger to add a trigger.
Step 2: Select the Stream Key, Operator, and Value for the trigger condition (e.g. avg_tmp > 70). Once the trigger condition has been specified, a notice (i.e. trigger action) must be set. Enter your email or SMS # into the Notices field (if you need to add an email or SMS #, follow the instructions on the screen to enter a verification code for each new email / SMS #).
Step 3: Overwrite the desired message in the Message Template input box. Several variables are available that can be utilized in the message template. For example, {{triggeredValue}} will return the actual value that triggered the message to be sent. Emojis and links can be used in either email or SMS message templates. Inline HTML can be used for email message templates. Additional trigger notices can be associated with the same trigger condition by clicking the +Add Notice button. This allows you to have both an email and a SMS notice set to the same trigger condition.
Step 4: Click the Create button to create the trigger. The resulting trigger summary will be displayed showing the trigger condition and resulting notice(s).
Available Template Variables
Variable | Description |
---|---|
{{bucketKey}} |
The Bucket Key of the current data bucket |
{{streamKey}} |
The Streaming Key of the current data bucket |
{{triggeredValue}} |
The value of data stream that triggered the notification |
{{magnitude}} |
When using the "increases by" or "decreases by" operator, this is the corresponding value used in the trigger condition. |
{{direction}} |
When using the "enters" or "exits" operator for geofencing, this is the corresponding direction value. |
Inline HTML Formatting for Email Message Templates
You can use inline HTML formatting to create a more customized email message template. For example, you can insert an image using the <img src="INSERT_IMAGE_URL_HERE" /> tag.
The following email template:
<img src="https://go.init.st/images/pizero_alert.png" width="100%" />
<br />
<br />
<p style="color:black;font-size:22px;text-align:center">
<strong>
🌡 Server Room temperature reached {{triggeredValue}}°F! 🔥
</strong>
</p>
will produce the following email message:
* Note: Images must be hosted on initialstate.com, init.st, or unsplash.com domains or they will not load. Custom images can be submitted via email to contact@initialstate.com for review. Once approved a link containing the image asset will be emailed back (e.g. https://go.init.st/images/pizero_alert.png ).
This manual submission process is only temporary until we release a secure, self-service image uploading service for your account.
Show Images and Preview Links in Custom SMS Messages
SMS messages can have a "Tap to Load Preview" option if the sender is a trusted contact. Add the phone number that sends a SMS trigger alert to your contacts, then resend a custom image or link message to get a "Tap to Load Preview" option on the SMS.
Comments
0 comments
Please sign in to leave a comment.