Automating Slack status changes on macOS

In these days of everyone working from home, I really liked the approach to setting Slack status that Alex Hidalgo mentioned on Twitter:

I wanted to be able to change status from Alfred. Turns out there’s a handy Applescript bundle by Sam Knight that makes this easy. Here’s how I do it:

tell script "Slack"
	focus workspace "Netflix"
	set status "online" with icon ":wfh-up:"
end tell

I couldn’t get Alfred to invoke this Applescript directly (I imagine it has something to do with Security settings in Catalina), so I saved it to a file (up.scpt), and then invoked it in a workflow as a bash script, where the command was:

osascript ~/dev/slack-automation/up.scpt

My Alfred Slack status workflow looks like this:

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s