Building a Slack bot to inspire serendipity in the office

This post was originally published on this site


At any given moment, people are doing some pretty neat stuff at The Atlantic. For instance, my coworkers recently:

But here’s the sad truth: I only see a tiny percentage of the things my officemates make. I just don’t have enough time in the day to read through every story on theatlantic.com. And even if I could, I’d still miss all the things our events staffers are planning, or what the product team is coding, or what the graphic artists are cooking up…

We all work in the same building, but I know very little about what people outside my own team (politics) do on a daily basis. And although I don’t really need to, I wondered if there was a way to introduce some serendipity into our working lives.

Enter SerendipityBot

They say that if all you have is a hammer, everything looks like a nail. I’m trying to be more careful about jumping to a technical solution when something might just need a simple conversation — or might not be a problem at all.

But in this case, I felt pretty confident about my idea: What if we had a Slack bot that unobtrusively asked random staffers about what’s energizing them this week, and then shared that with the office at large?

Here was the concept:

  • I’d make a Slack #serendipity channel where people who are interested in learning about what their coworkers do — and telling their own stories — could join and engage in conversation;
  • I’d code a Slack bot that would randomly ping people from that channel to share what they’re passionate about at that moment, at an interval of no more than once every two weeks or so.
  • Every day, the bot would ping coworkers during working hours until it had three responses. And at a set time, it would post all three to the #serendipity channel as a small blog post.

Would anyone even want to participate? I floated a trial balloon:

OK, so I wasn’t crazy! Those 25 people became my beta testers.

First job was figuring out what the bot would say to people. I wanted it to be chill and non-threatening, and give people the option of ducking out — but also be fairly direct.

Here’s what I ended up with:

The bot waits a while for an answer. If it doesn’t get one, it nudges politely: “I’ll ask one more time before leaving you alone: Any chance you want to share a cool thing you’re working on this week?”

It’s key, by the way, to give people a way to let the bot know they don’t really have anything they want to share. Sometimes, you’re just not working on anything exciting at the moment. Or maybe you’re too busy. In that case, the bot happily accepts snooze and leaves the person alone for two weeks.

Right now, I have the bot pinging a random employee every 10 minutes, from 11 a.m. to 2 p.m., Monday through Friday. Once it gets three responses, it stops for the day. (Of course, sometimes people respond a few hours late, after the quota has already been filled, so we’ll occasionally have four or even five responses in a single day.)

At the stroke of 2:30 p.m. — I originally set it for the next morning, but people didn’t like waiting a whole day to see their responses go up — the bot posts in #serendipity.

Here’s an example:

How has this experiment turned out?

Pretty well. More than 70 people have joined the #serendipity channel — somewhere around a quarter of the entire Atlantic Slack community. SerendipityBot had some hiccups: It spammed a bunch of people on Martin Luther King Jr. Day, which is on a Monday, when the bot thought everyone would be working. But overall, I think it has made each day a teensy bit more delightful.

What’s the long term impact? I don’t know. So far, I haven’t seen The Next Big Atlantic Idea bubble up from a conversation in #serendipity. But that’s not really the point. Getting to know your coworkers better is a worthy goal on its own — and I think SerendipityBot has helped with that.

If you’d like to look at the code powering SerendipityBot, it’s available here. Tldr: It’s a Node app that lives on Heroku and stores user information in a MongoDB database.


Building a Slack bot to inspire serendipity in the office was originally published in Building The Atlantic on Medium, where people are continuing the conversation by highlighting and responding to this story.

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑