Recently, I was introduced to Block Kit for Slack, and I was super pumped to try to work with this. Since my team at work uses agile and scrum for our work processes, and since we sometimes need to scrum through Slack if calendars collide, I though this would be a compelling use case for a block-based solution, and use Shortcuts to help assemble it.
The tl;dr of Slack Block Kit is that it's basically a big JSON payload that organizes content into a well-structured Slack post with sections, dividers, text, and interactions (like buttons or lists or forms).
The way my team scrums, we talk about what we did yesterday, what we're doing today, and calling out flags, roadblocks, or needs for help. Since I operate by a manager schedule and I use OmniFocus to manage tasks, this basically means I want a post that combines:
- yesterday's calendar events
- today's calendar events
- OmniFocus tasks that are flagged, available, and tagged with "Scrum"
I therefore set myself to build an iOS Shortcut. Getting that content is pretty straightforward, and combining it with text to have everything formatted in the right JSON construct is very doable.
Getting integrated with Slack isn't hard, but it's not nothing, either. Fortunately, Jake Bathman wrote a fantastic article on Medium that explains the process.
To make everything run smoothly, I also used Data Jar, a fantastic app for storing information to be used in Shortcuts, in this Shortcut for a few things:
- I keep the Slack API token in Data Jar, so that I don't accidentally share it (in the shared Shortcut here, it's at key
- I keep a dictionary of Slack channels in Data Jar to make it easy to interface with it (keys at
Slack.<<channel name>>). You can make this dictionary, too, with my Data Jar Slack Dictionary Shortcut (which I have written about in a previous post).
- I keep a dictionary about my team (at keys
Team.<<name>>) and each has a value for
SlackAPILink. In this way, I can do a find and replace on the OmniFocus tasks, replacing each member of my team's name with their
<@SLACK_API_ID>. I love this, because by simply adding someone's name in the task I have in OmniFocus, I will be @ mentioning them in the post that goes to Slack.
Here are a few other touches that the Shortcut handles for me:
- It is always assumed that "today" is a workday, so if I'm running this on Monday, the calendar from Friday will be shown (instead of the actual previous day, because please no Sunday meetings)
- The events from the previous calendar day and today are presented as lists to select what to include. They're all selected by default, but if I have an event that is confidential or personal, I can easily deselect it to exclude it from the post.
- If no OmniFocus tasks match the criteria, there is alternate content inserted.
- A footer is added to make it clear that the post happened by automation.
I am pretty certain this Shortcut, considering the above, won't work out of the box as shared, but I hope it provides adequate inspiration and framework for you to get value from. I'd love to hear what you think!
My work is driven, in large part, by caffeine. If this has been valuable to you and you'd like to support my work, buying me a coffee would be lovely. Thank you!