How to rib friends and notify people (or, The Birthday Bot)

Joe DiMento
Coda Blog
Published in
5 min readJun 8, 2019

At past jobs, when my colleagues felt compelled to celebrate my birthday, I endured it. The idea of ‘office birthday party’ conjures images of forlorn sheet cake in the break room and tepid renditions of “Happy Birthday” sung at me while my face presents that expressionless daze that afflicts each one of us every year. Occasionally someone may spring for an ice cream cake or — better yet — alcoholic drinks to ring in the mandatory celebration. As companies grow bigger, these forced celebration find their homes in teams instead of entire companies or divisions, so at least the embarrassment is cordoned off.

At Coda, we do things a little differently. Specifically, we build docs for just about everything — tracking bugs, planning a wedding, meeting notes — and when it comes to birthdays we’re no different. Or at least, that what I discovered when I had a birthday a few weeks ago.

It started innocuously enough — checking Slack while at home and enjoying my morning coffee. #Misc-random — normally home to news items and random invitations lit up, with a @here message, and my name in it:

I realized then I’d been birthday botted — a term that didn’t exist until that moment. Or to be precise, until about 15 hours earlier, when my colleague had decided to up the birthday game and create a tradition that many Codans now know and fear. Before I go into the details about some of the personal messages that were shared with all 55 of my colleagues in a public Slack channel, a bit of Coda product context is in order:

The Birthday Bot Doc

As with many good Coda docs, it all started with a table. In this case, a single table called “Table of things we like about [birthday boy/girl].” Then we added on a few other features that were critical: Buttons, which, when clicked by a user, take some pre-programmed action in a doc. Packs, or Integrations, are connections to other apps — in this case, to our heavily-used messaging application, Slack. And the last one, the most important one in this case, is Automations, or a programmable rules engine inside a Coda doc. With these three features together, complete with a handful of topics and photos collected from the birthday subject’s spouse, we were ready to set up the Birthday Bot Doc.

In this case, the single table had a handful of columns:

  • Things we like (Text) — Facts about the birthday subject
  • Image URL (Image) — Image to go with each message
  • Send Slack (Formula) — Concatenate formula combining the first two columns
  • Order (Number) — A column to indicate which message should be sent first
  • Result (Text) — A column to demarcate if a message from that row has already been sent (more details in the button column below)
  • Slack It (Button) — A button which is wired up to send the message to a pre-determined channel. It looks like this:
  • You’ll notice that the content is simply the Concatenated column I mentioned earlier. The channel is whatever you want it to be. And the Result column is just one you’ve set up for that purpose
  • The ‘Disable If’ is important, as the automation is going to look for a button to push each hour, and it should only push one at a time.
  • Next (Checkbox) — A formulaic checkbox column which indicates which message is next on deck. This is an important column, as you don’t want your bot firing off messages willy-nilly, so let’s break down how it works:
  • Here’s what it’s saying in a nutshell — look at this table, filter it so if the Result column is blank (meaning, no message has been sent, since that column is populated automatically when a message is sent) then sort the Order column and make the first one that remains the ‘true’ of the boolean checkbox. In other words: check the box, this one’s next.
  • As we saw in the button column, if the box is unchecked, the button is grayed out, so it can’t be pushed.

And of course, the doc had an automation. A pretty easy one, now that we wired up the columns as described above. The automation was called ‘BotherJoe’ and it simply ran every hour, and pushed the buttons in the Table above. Since only one button would be available every hour, that’s all that it required to set up.

As you can imagine, this birthday bot created quite a stir around the office. As the day progressed, the hourly message — with its anticipated, attendant embarrassment — would send people into a tizzy. At the end of a meeting I saw colleagues peering into their screens, waiting for the next message to appear. One person started counting down in the channel in anticipation “Incoming in 3, 2, 1…”. And while the channel and messages that day were replete with a few embarrassing missives — including referring to a natural highlight in my hair as a “winning streak,” something I’ve never said but may have to adopt as my own going forward — it was all in good fun.

You can check the birthday bot doc out yourself, and customize it for your colleague, here.

--

--