Write to Airtable from a Slack command

code × December 11, 2018

I built a Slack app that asks your workspace channel a random question every weekday. Members can submit questions via a Slack command if they wish. It’s great for ice breakers, to spark conversation, or to have something to look forward to every morning.

The best part is that it’s built on a few of my favorite tools:

Slack messages from Quiggles: Would you accept $1 million today (tax free) if it meant that you forevermore have a 50/50 chance of mixing up salt and sugar in a recipe?

Check out the README on Glitch to learn how I set up each service for the app.

Under the hood

Adding questions

  1. To submit questions, members use the Slack slash command: /quiggles what's for lunch today?
  2. The Slack command triggers the Glitch project to write the question as a row in the Airtable base.
  3. Upon successful addition of the question, the member receives an ephemeral Slack message back.

Asking questions

  1. I created a Zapier zap that will run at 11 am every weekday. It’s action is to POST to a webhook URL that’s pointed at my Glitch project.
  2. Once my project receives an authorized message from Zapier, it will pull all the rows from my Airtable base and select a random question (that hasn’t been asked yet).
  3. Next, my project marks the selected question as asked by timestamping the date_asked column in Airtable.
  4. Finally, Quiggles posts the question in Slack.

I dive deeper into how I setup each service in the README of the Glitch project.

And in case you’re wondering, I wouldn’t take the million dollars. I love treats too much to be disappointed 50% of the time.

Older