[Video: How to create a notification email, set triggers and test]
Send automated emails (aka notifications) directly from your bot that trigger depending on criteria of your choosing.
By setting up notifications, builders can easily notify people when users have interacted with their bot(s). Builders can automate the recipient email, the content body and insert links to generated documents.
Here's all you need to know.
First you'll need to determine where to send the notifications.
In the To, Cc or Bcc fields, either
- Input a pre-determined email address and hit return.
- Useful if you already know where the notification is to be sent (e.g. an internal recipient who will process the collected bot data).
- Click Insert email response into To.
- A popup will appear entitled "Insert email address". Here you can insert an email address collected by the bot via an email variable.
- Select the relevant email variable from the pop-up dropdown and click Insert.
[Image: Empty notification fields in an open first notification]
- Note: All notifications sent from Josef bots are sent via email@example.com. That said, recipients are able to reply directly to a bot's account holder by clicking Reply in their email client.
Next, determine what content the recipient(s) will receive.
Input a relevant subject (e.g. "Here's your document!").
Input the content body of your notification. As well as regular text, you can insert the following:
- Variables (populated by user information)
- Generated documents (featured as links)
To save, click Create, but don't worry! All notifications are saved as drafts by default. Learn how to make them live here.
Here's an example below.
[Image: Notification Content field featuring a variable and document link]
Now on to when the notification(s) will be sent. Here you can create trigger rules that send notifications based on how end users interact with bots.
By default, new notifications are triggered to send only once an end-user reaches a final message.
If you want to set conditions for when your notification will be sent, click Set trigger.
- The Edit trigger sidebar will appear on the left.
- Build out your notification rule(s) by first clicking either Add rule or Add group.
- Hint: If you're creating multiple rules, ensure the Any/All toggle is applied correctly.
- Hint: When Any is applied, any of the rules featured can be satisfied in order for the notification to send. Whereas when All is applied, all rules need to be met in order for the notification to send.
- Below Add rule and Add group you'll notice the A final message must be reached checkbox. If checked, then the notification will only send if the user reaches an end message. Uncheck this if you want it to be sent [insert when it will be sent].
- Hint: Inputted trigger rules can operate in conjunction with the Final message checkbox. Create trigger rules that work for you!
[Image: Edit trigger sidebar]
As mentioned, all new notifications are set to Draft by default.
Once the notification recipients, content and triggers are ready, toggle the notification to Live.
[GIF: Cursor switching a notification from Draft to Live]
Test, launch & update
Now you'll just need to check the notifications send as expected. Here's how.
Notifications only send in live bots. Therefore, in order to test your notifications, you'll need to launch your bot and interact with the live version.
- Hint: While testing, consider temporarily switching the Recipient(s) to your own email to limit any unnecessary emails being sent to the proposed recipients.
Feel free to Unpublish the bot between testing periods.
Once you've ensured the notification(s) trigger as expected, correct any temporary Recipient changes and return to the Launch tab and click Launch.
As with any bot edits you make when building, be sure to click Update bot in the Launch tab to apply any new changes to the live bot. To add more notifications, repeat the steps above by first clicking Add notification in the top right of the Notifications tab.
Got a question? Contact us at firstname.lastname@example.org.