Chatbots are trendy right now. But ChatOps has been around longer than you might think. ChatOps is simply bots operating with DevOps communication tools like Slack and Microsoft Teams. And ChatOps is evolving fast from ChatOps 1.0 to ChatOps 2.0. In this blog, I will illustrate the ChatOps evolution with Slack, and show you how you can integrate Gmail with Slack by using the tool YellowAnt.
What is ChatOps?
As Vince Power states in the Sweetcode blog post “Tools for a Modern Ops Team,” ChatOps is a type of operational management where a centralized, interactive(!), programmable communication channel is leveraged for operations purposes: conversation-driven Ops.
The less common name for ChatOps, BotOps, is a better name, because with ChatOps you have “conversations” with purpose-built interactive processes registered as “autonomous users” (a.k.a. bots) on the channel. These bots can listen for keywords, or interact. (But for now we will use the name “ChatOps.”)
Well-known chat tools used for DevOps are Slack, Microsoft Teams and Cisco WebEx Teams.
These chat tools can be integrated with bot frameworks like Hubot (from GitHub), Gobot or Err.
After integration, these chatbots will accept a text command through the bot (in the chat application), process the command through pattern matching or Natural Language Processing (NLP), and the user gets a simple message returned. This is known as ChatOps 1.0.
But pattern matching and NLP cost a lot of coding (text commands) and therefore can lead to errors.
This brings us to the new era of ChatOps: ChatOps 2.0. Can’t we use an alternative for the text commands?
Yes—by using dialog inputs and other interaction elements (e.g. message buttons and fields).
With this, together with a standardized syntax for bots, you can create workflows between bots, enabling them to “talk” with each other.
This can be illustrated by using the intelligent workplace assistant bot YellowAnt to communicate between the chat tool, Slack, and the email app for Gmail.
ChatOps 2.0 illustrated
For this experiment we need access to YellowAnt, Slack and Gmail.
This can be done by adding a YellowAnt bot user to Slack and integrating it with Gmail. (For simplicity, we’ve already done this.)
At this point, what do we have?
Figure 1: YellowAnt integrated with Slack, as seen in Slack
Figure 2: Gmail integrated with YellowAnt and Slack (see Slack enablement for new email)
Figure 3: YellowAnt integrated with Slack as seen in YellowAnt
Now let’s start a YellowAnt workflow by sending an email from Slack to your Gmail account.
Open up your YellowAnt app in Slack.
You will see a lot of messages from YellowAnt regarding the installation of the YellowAnt app and Gmail integration.
Figure 4: Welcome page for the YellowAnt app in Slack
Figure 5: Gmail integrated with Slack
Now let’s create an email in Slack and send it to your Gmail account.
Enter ‘help email’ in the Slack command line.
A thread frame will appear with basic email commands.
Note the run and explain command buttons. These buttons are part of ChatOps 2.0—bots interaction through buttons.
Figure 6: Thread list for email commands in Slack
Go in the thread list to the “Send an email (Send)” area and click the “Run this command” button as shown in Figure 6.
A pop-up appears as seen in Figure 7.
Figure 7: Send an email pop-up in Slack
Now we’re ready to enter a message, subject and a recipient email address.
For simplicity, the message is “This is a test.” The subject is “test” and the recipient is “[email protected].”
Click the Execute button.
Verify in the threads list if the email has been sent.
Figure 8: Email Sent notification in threads list (Slack)
Verify if the recipient received the email in their Gmail account.
Figure 9: Recipient received email from YellowAnt bot in Slack
This experiment shows Slack uses ChatOps 2.0 functionality by using third-party workplace assistant bot YellowAnt and the email app for Gmail.
ChatOps has been in use by DevOps teams since its early days. ChatOps solutions have evolved from using text commands (ChatOps 1.0) to the use of interaction elements (like message buttons) and a standardized syntax (ChatOps 2.0). ChatOps 2.0 can be illustrated by using the third-party workplace assistant bot YellowAnt and the Gmail email app to send an email from Slack to a Gmail account.