In Part 1 and Part 2 of our Chatbots for Security and IT Teams blog series, we examined how to build Chatbots for Microsoft Teams. While Microsoft Teams has now overtaken Slack in terms of popularity, Slack retains the hearts and minds of many, and healthy competition will no doubt result in better features for both. This blog will examine how to create a Chatbot in Slack to improve communication and collaboration within your team.
This process of collaborating within a chat tool is commonly called “chatops” – “a collaboration model that connects people, tools, process, and automation into a transparent workflow” according to Atlassian.
In order for ChatOps to be successful, it requires both the ability to kick-off automated actions from within the chat application, and for an automation solution to send alerts and data to the chat program both proactively and reactively.
In this blog, we will examine how to send basic notifications in Slack to a single channel, then we’ll examine how to interact with our Chatbot from within Slack, and lastly, we’ll learn how to send proactive notifications to individual Slack users.
As mentioned in Part 1, the idea of Chatbots for security and IT teams is not new – security teams in Slack, Netflix and Dropbox, among others, have created open-source Slack Chatbots for alerting purposes and for indicator enrichment. Creating your own Chatbot which fits your own internal processes allows you to be more flexible in your tool and process choice, and keeps your information private, however you should check out their blogs for useful ideas!
The first step to setting up your Chatbot in Slack is to create an OAuth application here – https://api.slack.com/apps. You’ll need to be an admin on your workspace, or be working with an admin, in order to do this. When you follow the link, you should be presented with a page like this.
Creating a Chatbot within Slack
Create an application called “Tines Chatbot” (or whatever name you choose). When you create your Slack App you have to choose your workspace. If this is your first time setting up an application, it may make sense to test in a demo or development workspace.
On the next page you’ll be presented with several options on what features and functions you’d like for your application:
Incoming Webhooks