Courier Automations is a new feature that we are excited to introduce on the Courier platform. Courier Automations is both an API and visual builder. It allows anyone to create logic for notification workflows. Do you need to remind class attendees of class 10 minutes before it starts? It would be best if you reached an engineer on call on multiple channels to get their response. Automation can help you quickly and easily accomplish these and many other use cases.
Automation: Why did we build them?
Notifications are the main way applications communicate with their end-users. However, the use cases can vary greatly. Some cases are simple and only require one message to go to a single user. However, many notifications require complex orchestration to provide the best user experience. Today’s developers often create a separate service for managing this logic. This creates additional infrastructure and development overhead and can often result in a poor end-user experience.
Automations were created so developers could create and maintain the best notification experience possible.
What are the current state of Courier Automations’ product and engineering teams?
Automations are now officially available. However,
Many customers are already using Automation to power key aspects of their product experience.
The Launch Darkly engineering team uses Automations to create the logic for
Notification associated with customer feature release approvals. An Automation is activated whenever approval is granted or requested. This ensures that all relevant stakeholders are notified. Learn more about the use of Automations here.
Officevibe is an employee experience platform that regularly sends Slack notifications to customers asking employees to fill out a short survey. Their engineering team uses the Automations API to create lists of users who could not receive the Slack survey and send them an email survey instead.
Yoga International is an online platform for Yoga. Their customers must have a seamless experience from the moment they register for a class to the beginning of the class. Their Engineering team uses the Automations API for timely reminders to class participants for every live class.
“Meetings Reminder”
Let’s create a reminder for meetings that sends out an email 10 minutes before the meeting and links to the meeting notes 2 hours later.
Design the Messages
- Log in to Courier, and navigate to Notifications Design.
- Create an email reminder to be sent 10 minutes before the meeting with Gmail (or any other email provider)
- Save the template ID from the notification settings and access it in future.
- Create an SMS reminder to be sent 2 hours after you meet with Twilio (or any other email provider)
- Save the template ID from the notification settings and access it in future.
How to Create Automations Using the API?
- Install node fetches within your Node.js application.
- Navigate to the Automations Reference, and copy the starter source code
- Add an automation item to an array of step objects.
- There are three steps to follow in this example: delay, send and another send. The first send step will send the 10-minute reminder. The delay step will be in effect for 2 hours after the meeting. The third step sends an SMS with a link for the meeting notes.
- Update Template_ID_1 to the Notification Template from Step 3 of Design the Message. Also, update Template_ID_2 to the Notification Template from Step 5 of Design the Message.
- Replace the brand, recipient attributes and attribute with your preferred and receiver IDs
- Update the ID template attribute if your steps refer to Notification Templates
- To trigger the Automation, run your code.
How to Create an Automation using Studio?
This example shows how to integrate an API V2 notification call (Step 5 in “Design the Message”)
- Navigate to the Automations Page
- Start an automation template from scratch.
Add a Send step and choose the “10-minute reminder” option for the Notification.
- You can add a delay step to increase the length of the time to 130 minutes.
- Change to code mode (top left, below the “Publish Changes” button) to add an API V2 notification to send a call for the SMS and a link to the meeting minutes
- Choose a trigger to trigger the Automation. The Automation can be manually triggered with a curl command if no trigger is chosen.
- Save your Automation by publishing changes.
- To test your Automation, create a Test Event.
