Make your Slack status the weather forecast

code × May 11, 2018

Filed under: things we probably don’t need, but idk I want it.

A bit ago, I made a weatherbot for our household Slack to remind us of nice weather so we can go for walks and of inclement weather so we can move the cars and hunker down. Since I spend a fair amount of time in Slack, I considered what it would be like to create a weather widget using a user’s status.

So I did:

screenshot of Slack where the user's status is a sun emoji with the forecast: Clear for the hour. 59℉

The emoji provides an idea as to what’s going on outside our window and then we can hover to get full details. I’ve set it up so that if the feels like temperature differs from the actual temperature, it’ll also let us know in the status.

It’s fun.

Under the hood

Every 20 minutes, Amazon Web Services will run the code to update the Slack user status of an extra (sandbox) account in our workspace. And that code will:

  1. Fetch the current weather forecast for my area.
  2. Convert Dark Sky’s forecasted weather icon to a similar emoji.
  3. Format the forecast summary.
  4. Update the status and emoji in Slack.

You can find the code on GitHub.

GitHub as a talk proposal review system