Get a life, get a bot with Hipchat Bot Will
By Dominic White
Head of Engineering, Switch Media
Want to know how you can tie all of your applications together to increase efficiency and reduce the need to login to countless programs each day? Dominic White, Head of Engineering at Switch Media tells you how to do this using Hipchat Bot Will…
Does this sound like your working life?
- It’s easy to get things done at work
- There is one simple system that I use for all my work needs
- I use the same system to request leave as I do to log support tickets
- I can find out the status of my expense claims in the same system that I message work colleagues
- I only ever need to use one login
If this sounds like your everyday work life then you can move along…..nothing for you to read here.
Alternatively, you’re work life may be more like this:
- I have different systems I have to log into to request leave, log a support ticket, log my time, check on my development tasks
- If I want to find out how much leave I have, I need to talk to someone
- If I want to know the uptime on our servers, I need to log into the monitoring system
Did someone say “Convergence”?
Imagine having an application that can integrate all of your disparate systems together? Imagine being able to post notifications into a single application and from the same application, query all of your individual systems?
For example, the following applications (that we use at Switch Media) would become even more useful, if they could be accessed from a single “convergent” application:
- Xero for accounting, leave and expense requests
- SalesForce for CRM
- Celoxis for Project/Portfolio Management
- HipChat for group chat
- JIRA for defect tracking
- Confluence for collaboration
- Bamboo for CI and deployment
- Stash for GIT repository management
- Kayako for Help Desk management
- Zabbix for system monitoring
The application that makes it possible
HipChat from Atlassian provides the possibilities to tie all of these applications together. On the surface it appears to be no more than a “good” chat program. It allows you to create rooms to stream your conversations, provides a history of all chat and supports audio and video calling. Nothing too earth shattering in that.
The really useful part of HipChat is that it has an API that allows you to integrate it with just about anything and by integrating it with “bots”, you can end up with a pretty smart personal assistant.
In it’s simplest form, you can use the API to post notifications to rooms. For example:
- you could create a “development” room and post notifications each time your CI server completes a build (pass or Fail)
- you could post notifications to a “Sales” room whenever a new opportunity is created in SalesForce
- Your monitoring system can post critical alerts to the “Infrastructure” room
The traffic doesn’t have to be all one way though. Within your chat window, you can interact with your other systems and display the results in the very same chat session. For example:
- Query Xero about what your current leave balance is
- Add new leave requests into Xero
- Query JIRA for the details of a JIRA ticket
- Create a new JIRA ticket
- Query Celoxis for all the tasks you have assigned to you for this week
The ability to interact with your other systems is provided by “bots”. Helpful pieces of code that “listen” to the chat conversation and action commands and keywords. The bots that you create are limited only by your imagination and the API capabilities of the system you want to interact with.
I get very excited by bots and the possibilities they present. Bots are not new or unique to HipChat and as one of our development leads said to me “IRC was using bots 15 years, what’s the big deal?”.
Bots – what’s the deal?
So what’s the big deal about bots? What can you do with them?
Some simple examples:
- Log a new support ticket in JIRA
- Tell you what the weather is where you live
- Return a list of development tasks that are assigned to you this week
- Prompt you for the time you spent on your assigned tasks
- Log a leave request
- Tell you how much leave you have left
- Display a random animated gif of a particular topic
- Tell you who is on support roster for this week
It’s really only limited by your imagination and the systems you want to integrate with.
Bots and HipChat
HipChat has a number of open source bots that already integrate with it. This means that you can get up and running in a very short amount of time and it makes it look like you did a lot of work
Atlassian recommend the following:
- Hubot & HipChat adapter (node.js)
- isis (Ruby)
- Lita & lita-hipchat adapter (Ruby)
- robut (Ruby)
- Will (Python)
- wobot (node.js)
At Switch Media we chose Will. In my next blog, I’ll show you how we integrated it with our Project Management System (Celoxis) to retrieve the task assignments for the week.