Using Slack apps for some fun games

If you haven’t already my blog on building serverless slack bot, do give it a read here

Couple weeks back, I built a slack app to conduct “The Virtual Treasure Hunt” for my team. The COVID lockdown has got us all working remotely with no interactions except for few work-related discussions. The idea was to increase interactivity and lighten the mood in the team.

Idea is simple. Slack Bot posts few puzzle/clues and you respond with what you have found — correct ones take you to next level. These are few examples of the quest.

Initially I built an interactive version of this app in my personal slack space using Views and Modals in Slack but then the game would have been single player. The aim is to get people to team up. There were newbies in the team who joined us after the lockdown that we literally never seen or talked to each other. This was one of those ideas that crop up in midnight of a weekend and I couldn’t get the permissions to reinstall my slack app from slack admin. My app had only slash commands enabled - no interactivity and shortcuts feature. I wanted to do just push a crude version of this idea out rather than wait out for another week to get necessary access from admin. Also, was going a bit crazy with the lockdown that I really needed to focus my energy on something🤷‍♀️ So a lot of what you see below, can be better implemented using some of the slack native features. So please keep in mind that I only had slash command feature at my disposal.

I was running the back-end using ngrok. Due to request limit per minute, I had to control the number of calls to the app as well. So I divided the teams into groups and assigned them cool names (courtesy : google search for “cool quarantine team names”) and elected a team leader for each groups.

Team Names ;)

Also it was a hangman game. If you got the answer wrong, you lose a lifeline. If someone other than the leader called the command to feed in the answer, you lose a lifeline. To prevent some people from getting a head-start, I also added start codes.

Rules of the game
ensures everything is in order.
Hangman game
You can use S3 bucket with public access to host these images and use just the url in the slack message.

I planted clues in the “/hi” bot I built (details here). Hint was : something that you know about a colleague + “Come say hi to me”

Saying “hi” to that person gives you a code. Entering this intowill give you another lead.
A colleague who uses “party parrot” emoji way too often. And in their profile page I have hidden a code. once you feed this into the bot you will get another quest
Once you pass the code you found to the bot command, you will get another clue — which is a blue jeans emoji

Contestants knew that you needed to join bluejeans with this id — but bluejeans will ask for moderator code. They needed to connect the dots and use the code obtained earlier to join the meeting — where I was already waiting with another clue at the chat section of the bluejeans meeting.

Clue was the URL : which displayed a Mona Lisa image.

I knew they would go straight for “monalisa” or “da vinci” — which is why this image. But both are not right. If you look closely at the URL, it is the reverse of steganography — art of concealing message in images. If you downloaded this image and opened in a text editor, you would find another code that unlocks the next level.

Next Quest was simply a “call me” emoji. By then they were smart enough to combine the code above with this hint. It was my extension number which went straight to my voice mail —which was the next clue.

The next clue was to uncover a location. While they were quick to figure out the location, only a few figured that this location has to be fed as coordinates — Fun fact : Go to google maps, right click on a location and click “What’s here”. You will see the latitude longitude.

End of the quest with The Office meme. My team had good amount of Office Nerds. so 😜

The setup was good enough for a 30 mins fun game for a team of 15 members. In hindsight, the lifeline feature was killing all the fun. I already limited the number of requests with the concept of leader-only-interact-with-bot. It didn’t need any more limit. Some teams quickly came close to losing all lifelines that I had to intervene and ask them to take it slow. Since I was running a simple java application with no state store to track the lifelines of each team, I couldn’t risk any team losing all their chances to complete the quest — although restarting the app would let them play again.

Also, I could have added “Ask for Hint” as a first hand feature too. The hidden message in image quest was too hard for some groups that I had to guide them — “Look for some clue in the url guys”. It would have been pretty cool coming from the bot itself. Then, the bot itself could have tracked the number of hints that each group used and decided the winner accordingly. I didn’t do any of that since it required that application to track the state. Only if it knew that a team is at certain level, it can post appropriate hint.

But with less investment — both time and resource, this was all I could deliver. Though I wasted hours looking into slack documentations on Views, Modals, interactivity, etc, and actually formulating the quest. Did you know originally I had 5 levels? One of them was a personalized cross word puzzle but I had to cut it out to keep the game short. But once I finalized the idea, it took me less than 10 mins to build the whole thing.

The idea is fun but you could build it in any number of ways. Sure there are already hundreds of apps available in Slack and many platforms. But playing a game very customized to your team is always special 😊

I also had another idea to customize the “taboo” game. You could try it out by combining webhooks and event subscription — to easily watch out for taboo words and correct answers. There were plenty of other fun ideas I had but couldn’t remember much now. These days we are sticking to Kahoot and Pictionary because I am so sick of slack apps and have no plans to attempt another one for a while 😃 So this is probably the last blog you would see on my space that is about Slack. Ciao!

Not a blogger. I mostly move my well-written notes here.