How We Built Pankbot
Last week, Pendo hosted our second, semi-annual hackathon, or, as we like to call it, Bias to Hack. During this round of Bias to Hack, I sat back and joined another team; six months ago, however, I was pitching my own idea. It was an idea that would make the lives of Pendozers much easier but one that requires a bit of explanation.
At the time, I was a member of the Culture Club here at Pendo, a rotating group of Pendozers that plans most of our events and other little culture-related surprises along the way.
A few months back, the Culture Club decided that folks at Pendo should encourage each other to uphold our company’s core values by giving each other different colored poker chips when someone displayed one of our seven core values. We call them Panks.
Here’s how it works: if I decided that Michael had shown our core value of Bias to Act by jumping on a bunch of customer calls to help solve problems on the spot, I could go drop the appropriate Pank in his Pank (mason) jar. At the end of each quarter, the Culture Club would count all of the Panks and provide awards to those who had best exemplified a particular value or those who had received the most Panks overall.
However, the end of the quarter turned out to be a bit of a nightmare when it came time for counting. Even when we had 50 employees, the act of physically collecting the Pank jars, counting the Panks, and making sure that both the jars and the Panks were returned to their rightful owners became quite a task, and we knew our team was set to grow. So I thought, why don’t we automate this? And thus the idea for Pankbot was born.
Bias to Slack
Pankbot reduces the friction of giving Panks. It’s a Slack integration that allows one to Pank on impulse, in meetings, or from one’s desk. We simply use our new /pank command with information about which Pank was given and who it was given to as well as a message about why we’re giving the Pank. Although we probably told each other why we were Panking each other while handing over the physical tokens, it’s really cool that we store this information now so that we can see it again at the Pank award ceremonies. And those who are shy need not be afraid of Panking. Adding a private flag to the end of one’s Pank command keeps the Pank award from being announced in any public forum.
Combining Heads & Hearts
Our company was not 100% new to Slack integrations by the time we started this project. One of our team members, MKJ, was in the process of working on integrations for both Github and JIRA. His first goal for the hackathon was to improve upon those already-existing integrations. He set out on the first day to make it so that users could see the status of a list of JIRA issues as well as remove some tech debt and refactor his already existing code.
Meanwhile, the rest of the team looked into getting a fully-functioning bot set up from end-to-end. We found that one can put scripts directly into Google Sheets. So we decided to put the code into a Google Sheet to talk to Slack and save all of the Pank information. However, we ran into one big problem: Google scripts were too slow for Slack. After a certain period of time, Slack assumes failure, so we had a hard time getting a response back to it.
Making Happy Pendozers
We spent the last part of our hackathon and the next few days iterating on the bot implementation. It needed to be able handle a bunch of different cases, such as if the user tried to give out the same Pank more than once in a quarter, if the user typed in a bad command, or if the user tried to Pank him or herself. And, of course, in the latter case, we had to poke fun at them a bit in the response message. Eventually, we sorted out all of the kinks and got a bot that works for our purposes, and The Culture Club is much happier with the process.
If you think you’d enjoy working with a cool product while building stuff to make your colleagues happy on the side, check out our open engineering positions. Find out where you fit on our team and start brainstorming for our next Bias to Hack.