For our Pre-Halloween October 28th Courier Live, Nate Munger returned to help me come up with a socially distanced way to handle Trick-or-Treaters using Courier. Taking inspiration from the Smart Security Camera RaspberryPi project, we thought it would be cool to disguise one of those as a Halloween decoration and have it send images of approaching Trick-or-Treaters to a Slack channel with buttons that would allow members to present them with a Trick or a Treat. We walked through setting up the Slack notification in Courier and handling the buttons using a Glitch app. We'll leave delivering the tricks and treats to you.
Check out the video below to watch us:
Create a new Slack App and install it to our test workspace
Build a new Slack notification with action buttons using Courier
Use a Glitch Node.js/ExpressJS application to handle the Slack button actions
Send the notification using the Courier Send tab
Code for the Node.js/ExpressJS server handling the Slack actions can be found in the Glitch application.
Be sure to Like the video and Subscribe to our YouTube channel.
For this project, we wanted to have 2 Slack buttons side by side. To do this, we used the Jsonnet block to build a Block Kit Actions Block. The following code when used in a Jsonnet block will result in the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"type": "actions",
"elements": [
{
"type": "button",
"action_id": "btnTrick",
"text": {
"type": "plain_text",
"text": "Trick :ghost:",
"emoji": true
},
"value": "trick"
},
{
"type": "button",
"action_id": "btnTreat",
"text": {
"type": "plain_text",
"text": "Treat :candy:",
"emoji": true
},
"value": "treat"
}
]
}
The actions for the resulting buttons can be handled using a server like we created above. Action Blocks can be more than just buttons. Check out the other available Interactive Block elements.
Is there something you’d like to see us do using Courier? Let us know and it might be the subject of our next Courier Live. We stream a new Courier Live every Wednesday at noon Pacific. Follow us on Twitch to be notified when we go live.
-Aydrian
Courier April Product Release Updates: In-app Inbox, Preferences, and Automations
In this update, Aydrian and Nate (Head of Customer Success) as cohosts cover what is new with the in-app notifications API, our new preferences component, and our automations API, which is now GA.
Aydrian Howard
May 20, 2021
Courier Live: Content, Notifications, and IoT
On February 2nd and 3rd, Shy Ruparel joined Aydrian for another Courier and Contentful crossover stream. This time, they decided to play around with an IoT E-ink display and use it to show the latest posts from Contentful and send notifications using Courier.
Aydrian Howard
February 10, 2021
Comparison Guides
© 2022 Courier. All rights reserved.