When given a choice, take both!
Let me introduce myself briefly. I am Leo and I have been developing software for around 14 years. My days look pretty similar to each other as well as to the days of other software engineers.
However, a few months ago, I started developing some small Chatbots and automation to help do things faster and more effectively.
Do it by the book, but be the author
My old friend, CEO of a small DevOps company, challenged me to envision and develop the best way to power up an organization with ChatOps.
The challenge was accepted. I knew what continuous delivery is, and how to make a bot. What I didn’t know was the target a business or team would like to hit when the use messaging systems and a myriad of other tools.
What would you like to automate?
Who would be a typical user persona?
How would this persona use Chatbots in combination with other services?
I spent some time to check around and play with some chat bots, and did additional research to see how the chat systems were used inside Atlassian. I gave up. There wasn’t much available to play with or research.
Don’t walk, when you can run!
Last October, I flew to Vienna, Austria to speak about productizing chat bots and what it means to make a good one. There I had a great opportunity to meet different bot developers and people who want to build a bot or were just curious. That was an eye-opener for me. The space was so new that there were no best practices or anything.
I came back and went to a few more meetups to talk with people about how they use chat platforms with other tools. I were really surprised that everybody told me the same story: we use multiple of services and multiple chat platforms; we only use notifications from a service to a chat platform; but we wanted to get more automation, reporting, workflows, but all systems did not support this and we didn’t have the resource and expertise to build something on our own.
You get what you incentivize
I’ve always been a competitive person. I’ve even done Ironman triathlons and ultra runs. So I accepted the challenge to find out one of the best ways to power up an organization with ChatOps. Additionally, I didn’t want to stop at the engineering side of things. There are many other departments who need help and use messaging systems.
My journey began with a simple case where I decided that every person deserves to receive the information they were interested in. Most of the services I tried had a bot or a webhook integration which allowed you to receive notifications.
The notifications coming into my chat tool looked pretty nice, and were helpful until you get too many of them (or you need to link them together to make a bigger decision). After a while, I started ignoring them. Another problem I saw was that I couldn’t do anything with them from inside chat. I had to click a link and visit a connected system to continue working there.
I found a comrade that helped me set up something I believe should be part of any notification solution. Can you guess it? Yes, it was an ability to filter, postpone or snooze notificaitons. Most of the chat tools out there don’t provide this out of the box.
Ok. Now I could filter notifications and the volume went down. Nice one! But the number of connected services started dragging me down and jumping between tabs really drained my energy. So I decided to turn the game around and let the services work for me. I wanted to be able to act using notifications I had received. Then I looked for the systems I had connected and realized that to act on my behalf, I needed to map my chat account with an account in the connected service.
Roger that! But I had a problem, Captain. I meant to do this for every service I used, but it wasn’t so easy. Most of the systems did not support actionable notifications. I found a few examples how this could be done, as well as I developed my own solutions to make easier.
I also decided to check other tools like Salesforce and Workday to see whether I could receive notifications that comply with all my requirements. For Salesforce I found Troops.ai, a custom solution that allows this. You can bind a chat account to a Troops account and the Troops account could be connected to a Salesforce account.
I felt awesome. Workday, on the other hand, failed me completely.
Fail early, fail often, fail forward!
After the notifications were set up I could continue on my way to automation happiness.
Automation. How much meaning in this word. I can’t be everywhere at once, so I selected a few things which make sense to automate:
- follow up actions after a retrospective meeting
- orchestrating to-do lists
- pull request follow-ups
- time off and travel approvals
- employee onboarding
Every few weeks I participate in different retrospective meetings, which are usually documented in Atlassian’s Confluence. There are always some tasks created on the page for people to follow up on. Another thing I had seen was to create Jira issues to follow up on the tasks during the next sprint.
What I have been seeing is that most people don’t follow up on tasks correctly and often forget.
I decided to automate this process so when a retrospective page was created, I created a list of tasks and assigned them to people. If a task depended on another task, I needed to make sure that all upstream tasks were done. Additionally, I wanted to have deadlines and reminders for tasks.
I remember talking to Mike Brevoort back in September about his new service called Missions.ai and I remember it was targeted to automate workflows in chat. I decided to jump on the train and give it a much deeper test.
I managed to free up some of my brain and now teammates don’t have to bug each other to follow up on actions from retrospectives. That was easy and straightforward.
Later that day I realized that automation of retros enabled me automated any distributed to-do list. Uhhu! Checked.
Many developers don’t have a long-lasting memory and often forget to follow up on their pull requests. (Or, they just procrastinate.) As a result, the development cycle for a particular feature gets longer. This may be not so important for Scrum teams, but I am a true Kanban fan and don’t like to have a lot of work in progress. I decided to automate chasing down my teammates to get my pull requests reviewed faster. I also made a chaser to ping me when I need to update a pull request, provide comments, or make a review for somebody else.
When faced without a challenge, make one.
I wanted to do more with Missions.ai, however, it couldn’t watch PRs where I need to actively participate. I tried in a few different way. I wrote custom code. That failed. I wanted to try the Hubot, but it needed some more coding, which I was not in the mood to do at that moment.
I was determined to accomplish my mission, so decided to go another way around and not rely on any existing bots. I decided to develop an AWS Lambda which will listen to the Github webhooks and when there is something I need to know (PRs mostly) it will send me a message via a Slack webhook integration. Another Lambda can be made that is scheduled to run every few hours to check whether there is something that needs your attention.
My time was limited and I needed to make more of it, so the last part of this little quest was to automate time off approvals. What did it envolve?
My dream automation was to make it nearly one click and forget about it, forever. The steps could look like this:
- Schedule a PTO with a command. “/PTO from 29–02–2018 to 31–02–2018 I will be speaking at Not-existing February Conf”
- A Chatbot will notify my manager about this PTO. Get approval if needs to be.
- It will mark my work and my team calendars as Leo is OOO.
- It will notify my team on the first day of my PTO that “Leo is not here until 01–03–2018”.
- It will change my Stride/Slack notification settings
- Email, I don’t use it much. But it could also setup OOO reply to my email.
Ok. Shall have I really set up my PTO if I’m the only one who knows about it? :)
After researching a bit around I found a Vacation Bot. It is very low quality, but I managed to get it running. It could do a couple of things from the list above.
The day was not over and I was dreaming about my super PTO automation, but my dream didn’t help to become it a reality.
The approach I could advise is to develop a simple Chatbot that does all those 5 points above. It will rock if the systems you want to work with have open APIs. The sun was coming down and decided to move forward.
If it were easy it would have been done already
The next week we got a new grad into our team and I agreed to be a buddy for him to kick off his start. In the back of my mind, I knew it was my turn to try some new things on Ho. My thinking was that his onboarding was a perfect candidate for some automation, so the challenge was accepted!
To my surprise, Missions.ai fit the bill this time and they even had a template for an employee onboarding, which in reality is a to-do list. I just needed to set up some tasks and let it run. It’s not much different than a document with checkboxes.
The dream onboarding would be similar to a combination of workflow automation with an ability to integrate with other services when an employee needs to do something. This could be done with custom glue code which fits perfectly to serverless architecture or web tasks frameworks. The only drawback here is that you need to have access to all systems where you want to push an update. However, there are a couple of shortcuts that may help you — IFTTT and Zapier.
It looked that I mostly managed to automate myself out of many routines and boring processes. Was I done? I didn’t feel like I was.
Without a target you’ll miss it every time
One day I met Arik, he was an Analyst with whom I played chess. He asked me what do I know about KPIs in agile software teams and recommended me a related book. I started digging deeper in the area of teams KPIs and what was usually looked at by the team. I found multiple artefacts: Jira dashboards, excel reports and multiple wallboards that all tried to increase team’s visibility on progress and allowed people to see more or less what was going on around them.
On top of this, I decided to check how other teams collected KPIs and monitored them using ChatOps. I found Statsbot, a bot that provides scheduled reports based on data from different analytics services like Google Analytics. I tried it and I was hooked. It was very easy to setup and use. I started thinking that it would be amazing to have something like this.
Find something you would die for and live for it
Why have I shared this story with you? This is an excellent question. My idea was to share with you how my team and I use chat bots to increase our productivity and have more fun! Additionally, this little journey allowed me to make a quantum jump and I learnt hell of a lot.
To sum up, chat bots is pretty new space. There is a lot of buzz, but it is still immature and you may need to do some glue code yourself. On top of this, the existing solutions pretty often are not very well developed and have limited functionality, so be ready to incorporate 3rd party and your own bots. We use multiple bots daily, and I personally use even more, so I do advise you to think about a chat bot as another web application that requires similar attention in all directions, that includes error handling, debugging, security, support, and product analytics.
Why would you use chatbots? Because you don’t like to do repetitive tasks, so you automate things and connect them to a chat platform which you mostly use to communicate with your colleagues and friends. Another answer can be that it is much easier to make them and connect all dots together.
My call to action today is that you try some of nice chatbots and try to make one as well. And you don’t need to applause, BUT please share your experience with me.
Correr o morir!