This bot tells you who people are

James McKinney
Ontario Digital Service
3 min readOct 11, 2016

--

Connecting with people inside and outside the organization is crucial to our work: if we want to help create excellent digital experiences for Ontarians, we need to make sure we can work with the teams across the organization doing this important work.

As a new employee of the Ontario Public Service (OPS), I’m meeting a lot of new people: who they are, what they do, and where they fit in this organization of over 60,000 people. A big challenge of on-boarding that everyone in a large organization faces is keeping up to date with all the new names and roles that we encounter on a daily basis.

The OPS employee directory (INFO-GO) has been a really useful tool to help with this transition, but I’ve wondered if there was a faster way to access the directory other than opening a browser tab, visiting the website, and doing a search every time I hear a new name — which is a lot.

Screenshot of the INFO-GO employee directory.

Recently, I discovered that the employee directory has an API (an API is a way for one computer program to share its data and functionality with other programs.) I did this by opening my browser’s developer tools, going to the network tab, and looking at the requests that the browser sends after I do a search or click a link. In response to most of these requests, the browser receives JSON — a lightweight format for transferring data — containing people’s names, positions, and contact information.

From there, I knew that I could, for example, find myself in the directory by opening this link:

http://www.infogo.gov.on.ca/infogo/v1/individuals/search?&keywords=James McKinney

If you click that link, you’ll see JSON: bits of text that are meaningful to humans interspersed with punctuation that’s meaningful to computers. If you replace my name in the link, you can search for any other name in the directory.

Coming back to my problem, the API is a way to search the employee directory without visiting the website — which is exactly what I was looking for. I want to be able to search using a program that I always have open, and not have to open a browser tab, visit the website, and then search.

In our office, we regularly communicate over online chat — HipChat, to be precise. One of its features is that it makes it easy to write chat bots: programs that respond to specific messages in the chat — made possible because HipChat has an API, too. Using HipChat’s example bot, I was able to write a simple bot that responds to messages like /whois James McKinney with contact information from the employee directory.

Screenshot of /whois lookup bot.

If you don’t include a name (if you just enter, /whois), the bot responds with an example of how to search the directory.

Screenshot of /whois lookup bot.

The bot has since become popular with the team, who has been using it to quickly find people’s positions and contact information. It’s one more tool that makes our work faster and easier, and that integrates with how we work. And, personally, it made it simpler for me to find and approach people across the OPS so that we can work together to deliver great digital services to the people in this province.

For the curious: I named the bot Toronto Telephone Despatch Co., after the publisher of Canada’s first telephone directory. (In 1879, it was six pages long.) I named the command whois, after a standard to look up domain names and the contact information of their owners.

James McKinney is a senior advisor on the Ontario Digital Government team. Prior to joining the Ontario Public Service, James founded Open North, a Canadian nonprofit with an international reputation for its digital work on public participation and government transparency.

--

--