How to make a free BirthdayBot using Slack and Google Sheets

  1. Admin access to your Slack space (note: just Admin is sufficient; Owner isn’t necessary)
  2. Admin/Edit access to the Google Sheet
  3. Time to read through documentation when required, and the ability to debug if necessary
  1. Slack app plus Google Sheets script. Make use of a straightforward custom Slack app, incoming webhooks, and Sheets’ automation capabilities.
  2. Running a lambda on AWS using Bolt. The most technical option, which gives you the most customisation. Bolt is a framework for JS, Java, and Python for building Slack apps.
  1. The script will check today’s date (month & day) against all listed birthdays
  2. If it finds any matches, it will ping your custom Slack app with a payload using an incoming webhook
  3. Inside the payload is a message. Your Slack app will post that message
  4. Someone will be wished a very happy birthday!
  1. Create the Slack app and bot
  2. Write the spreadsheet script
  3. Set the script trigger

1. Create the spreadsheet

Create a new Google Sheets spreadsheet with two columns — “Name” and “Birthday (mm/dd)”. Format them as plain text. Fill them in with your data, and include a “Test Test” and today’s date for testing purposes.

2. Create the Slack app and bot

Head to https://api.slack.com/apps and click Create New AppFrom scratch . Complete the fields.

  1. Toggle the webhook to On
  2. Scroll down and click Add new webhook to channel
  3. Select your channel (it might be worth setting up a #tech-sandbox channel or similar!)

3. Write the spreadsheet script

In your Sheet, go to Extensions → App Scripts. I hadn’t even heard of Google App Scripts before now and it blew my tiny mind. Very powerful, and (at least by me) criminally underused.

Left nav for Google App Scripts

4. Set the script trigger

On the Triggers left nav, add a new trigger. Pick Day timer and a time slot that suits you:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Lucy Mitchell

Lucy Mitchell

236 Followers

Technical Writer. Former NHS OT and software developer in health tech. I like bikes and plants. www.ioreka.dev