Alarms in your SIGNL4 team can also be created manually from a Slack conversation. This is basically quite simple and consists of the following digital assets:
- a custom Slack App for SIGNL4, which you create in your own Slack-Team
- the Slack EventsAPI (https://api.slack.com/events-api). This API forwards desired messages/information from Slack to a remote HTTP endpoint (Webhook).
- a bot user in her Slack team for your SIGNL4 app, as well as the corresponding permission scope of the app for this user
- a small orchestration proxy that forwards the HTTP calls from Slack to SIGNL4. An example is Microsoft Flow or Zapier. I have attached my Microsoft Flow template to this post below
The setup is described in more detail below. Let’s start with the proxy.
Create the flow or zap
The Slack EventsAPI does not send messages to any handler, which is a pity. In this case we could have worked directly with the SIGNL webhook in the Slack App. Instead, we need a flow or zap that returns a “challenge” from the request body directly in the response to a validation request from Slack. The procedure is described here https://api.slack.com/events/url_verification. Slack makes sure that the endpoint to which I want to send to, is mine. So I built a flow in Microsoft Flow for this purpose, which does exactly that. The same can be done in tools like Zapier:
- Extract the value of the challenge parameter and return it in the HTTP response, as described on that Slack page. If not the challenge parameter, but an event object is contained in the request from Slack to this handler, it is already a message in Slack that is to be forwarded to SIGNL4. In this case, I simply call my team’s SIGNL4 webhook and give the Slack server a 200-response back. It is really only the simplest HTTP routing. Here is a screenshot of my flow:
Create a new app in Slack
Next, create a new app in your Slack team. This can be done here via this link: https://api.slack.com/slack-apps. I suggest calling it SIGNL4 😉
Create a bot user
Next, select the “Bot Users” menu item in the App settings menu. Here you can create a new bot-user for this app by simply pressing a button. After that, the view should look like this:
Set scope(s) for the app
Let’s continue with the scopes for the permissions of the new app. Select the menu item “OAuth & Permissions” in the menu of the app settings, then scroll to the area “Scopes”.
Your new SIGNL4 app only needs the scope of the bot user you just created. To do this, select the scope “bot”. If you have not yet created the bot user at this time, it is also possible from this point and then the scope is defined for it automatically here as well.
Choose desired events
Finally, you only have to select the events you want to forward to your SIGNL4 team. Select the menu item “Event Subscriptions” from the App Settings menu.
- First activate event forwarding via the on/off switch.
- Next, enter the URL of your flow or zap HTTP trigger. The webhook of your SIGNL4 team cannot be entered here directly, because it will not respond to the validation request of Slack with the challenge. But as soon as your zap/flow has returned the appropriate response, the text field turns green.
- Scroll to the “Subscribe to Bot Events” section on the same page. Here you select the events to be sent to SIGNL4. I chose “app_mention” and “message. im” in particular. This allows me to easily send all relevant messages to SIGNL4 which are received in a monitoring channel, for example by sharing these messages with the SIGNL4 Bot user.
- Save everything afterwards.
Add the app and kick off
Finally, all you need to do is adding your new SIGNL4 app to a desired channel where your relevant messages are received. I did this by sharing a message with the SIGNL4 Bot user, so I could add the whole app there. Here comes a Consent Grant dialog, i. e. you have to allow the app to access your Slack team.
Afterwards, you can simply share the messages you want to forward to your SIGNL4 team with the SIGNL4 Bot user. All team members on duty in SIGNL4 are then reliably alerted about it:
Conclusion and outlook
Of course, it would be best to use a native SIGNL4 app from the Slack app directory – we are working on it. Until then, you can go the small detour via a custom SIGNL4 app in your Slack team. Unfortunately, the route still has to be done via a web orchestration tool, so I exported my flow as a small consolation and attached it here. If you are interested in a Zapier version of this, let us know via Twitter and we’ll try to cook something up.. 😉