Nerdbot, a Custom Slackbot
Nerdbot is a custom Slackbot that allows users to add items to a Google spreadsheet via Slack.
Nerdbot is a side project.
Launched in Nov 2016
2 week project
A group of people joined together on Slack, wanting to create a collaborative reading list and use Slack as a space to discuss. We started with a Google spreadsheet.
The challenge with spreadsheets is that they aren’t always easy to keep up with. Apart from getting email updates every time someone adds something or manually opening and scanning through the spreadsheet to find changes, spreadsheets are sometimes hard to engage with over the long term. I wanted this to be a resource that would continue to involve people and serve as a living document.
In order to incorporate the reading list into the space where people were already having discussions — Slack — I built a bot that helps increase visibility of the list and lets people add directly to it without ever leaving Slack.
Final User Experience
With this bot, I wanted to make sure it felt intuitive for users to add items from Slack, and that feedback loops helped increase visibility in the group and assure the user that they had successfully posted to the spreadsheet.
We needed a way to organize the Slack message so that it was easy for humans to write, but unambiguous for the bot to parse. I decided that using a semi-colon to separate items like title, author, description, and link was the clearest format. A semi-colon is not likely to be used in the main content, so it’s unique, but it’s not too abstract or intimidating.
The goal was for each Slack message to be added to the correct Google sheet, with each piece of information being added to the correct column. In order for Slack to know which messages to send, I took advantage of a Slack feature called “trigger words”. The format for telling the bot what to send via the trigger word "add:"" would look like this: "add: category; title; author; description; link".
Since users will have to input the correct topic name in order for their item to be entered correctly into the spreadsheet, it’s useful to be able to check the topics without actually having to open the spreadsheet. The bot could return a list of topics based on sheet names after a user types the trigger words "list topics".
After a user adds an item via Slack, it would make sense for some sort of confirmation to be published in Slack to reassure the user and help everyone track what’s being added in one place.
If you're interested in learning how this was actually built, read a full tutorial on Medium.
The open source code is available on Github.