Feliz Cumpleanos, baby.

February 05, 2022

Okay, so I don’t remember finishing the Terminator, but that didn’t stop me from creating the Geburstaginator. The idea came to me while I was in Berlin over the holiday break. I knew I had a friend’s birthday coming up and wanted to make sure I didn’t miss it. I don’t use facebook so keeping track of birthdays can be tricky. Sometimes I manage to add birthdays to the contact on my phone, or as a recurring event in my calendar, but I still managed to forget a few. There had to be a better way.

While thinking about this I was reminded of a fun stamp a couple coworkers made a few years back saying something like “Best wishes! — Peter & Shane”. They were able to stamp this on every card that came across their desk for almost any occasion and there were a lot, the majority of them people we didn’t know.

They automated the greeting and had a bit of fun doing it. And then I knew I could do the same and so I set out to make the Geburstaginator. Geburstag is the German word for birthday, and so the Geburstaginator is a robot programmed to issue birthday robocalls on command.

Geburstaginator is hosted on Heroku and uses Twilio APIs to send text messages and make calls.

I use the Heroku Scheduler addon to trigger a worker job every hour that:

  • Sends me any reminder text messages for birthdays happening the following day
  • Makes birthday calls playing my happy birthday recording

The main Heroku web dyno is sitting by waiting to serve the static birthday greeting mp3 file when requested by twilio, to be played on the call.

In testing I discovered there were a few interesting challenges. The first and most important was coming up with a fun recording of me wishing happy birthday. It had to be generic convincing enough, leaving pauses for conversation (albeit with some rude interruptions). It also needed to have the right pacing so that it wouldn’t sound too weird if it ended up in their voicemail.

Another consideration was when exactly to make the call. Depending on where they are in the world the greeting should be received when it’s their birthday where they are. I also don’t know if people would enjoy meeting Geburstaginator at 12:00am, the very instant it becomes their birthday. To keep everyone happy I track a personalized time and timezone for each person.

The last piece was making sure that I didn’t send duplicate calls. Every time a call is made it’s tracked so that the next worker job can filter it out from being made again. Heroku offers a free redis service which made it quick and easy to track based on a uniquely composed key that was saved after a call had been made. The keys are set to expire after a few days, well outside the call window the worker jobs operate within.

For logging there’s a great Heroku Addon called Paper Trail that let me scroll back and track what Geburstaginator was up to.

I am happy to say that I am now much, much better at wishing my friends and family happy birthday. The first few test calls have left people mildly confused but very much assured that I was there to wish them a happy birthday. Twilio also records the call so I’m able to enjoy the laugh with my friend after. I plan on feeding Geburstaginator more birthdays. I’m not sure if the stunt will last more than one round even if I change up the greeting, let’s see.

I’ll be back… maybe.