Mac O’Clock
Published in

Mac O’Clock

Automate Mac Workflows with Quick Actions on Touch Bar

And no, you don’t need to be a developer

Altered image from Wikimedia Commons under Creative Commons License

I live by a simple rule — If a task requires more than five minutes per day, spend five minutes automating it. Rarely do I ever break this rule, and for good reason.

Automation has completely reshaped how I use my mac; the personalization, time savings, simplicity, and ultimate power at my fingertips is more clear than ever before. For example, many of my machine’s automations include app and window management, batch file operations, automatic email communications, and the list keeps growing every week.

One major talking point of iOS 14 is pinning automations to the home screen. Despite the hype, this feature has been available for MacBook Pro users since the release of macOS Mojave in 2018!

Objective

I have a bad habit of keeping an unreasonably large number of Safari tabs open at once. In this tutorial, I will be building an automated workflow that simplifies my safari workspace into a few, predefined tabs.

Introduction to Automator

Every Mac ships with an application called Automator. You can find it under /Applications/Utilities/ or by searching for it with Spotlight (⌘ Space). Once open, create a new automation (⌘ N), and select Quick Action.

Screenshot from Author’s MacBook Pro with Touch Bar

Before we define the workflow, the automation requires some set-up. We first declare that this workflow will not recieve any input and can be run while in any application. We also choose an icon and color for our Quick Action. Finally, save the automation (⌘ S)and give it a name.

Screenshot from Author’s MacBook Pro with Touch Bar

Automator is full of handy features. The Actions Library (left) hosts a thorough list of pre-built actions your workflow can utilize by dragging into the workspace. One of my favorite features, though, is the record button (top right), which observes all actions you commit on your Mac and translates it to repeatable system events.

Building the Workflow

AppleScript

The first action we will include is Run AppleScript. Sure, nobody knows AppleScript by heart, but there are just enough snippets on the internet for you to find your way. Here’s a quick script I found on Google that closes every Safari window currently open.

on run {input, parameters}
tell application "Safari"
close every window
end tell
return input
end run

Here’s the action in Automator:

Screenshot from Author’s MacBook Pro with Touch Bar

Opening Tabs

Next, we’ll use the Get Specified URLs action to indicate which websites to open. In my case, I want to open my personal website, GitHub, Yahoo Finance, LinkedIn, and of course, Medium.

Then, lets implement the Display Webpages action, which will automatically take the list of URLs from the previous action as input.

Put it all together, and we get this workflow:

Screenshot from Author’s MacBook Pro with Touch Bar

Don’t forget to save!

Adding Quick Action to Touch Bar

This process is incredibly simple, since it is native to macOS. There are no third party downloads or other hoops to jump through.

In System Preferences, navigate to Extensions/Touch Bar, and you should see a list of your Quick Actions. Make sure to check every Quick Action you want to appear on your Touch Bar.

Screenshot from Author’s MacBook Pro with Touch Bar

After that, click Customize Control Strip… and drag the Quick Actions button onto your Touch Bar.

Screenshot from Author’s MacBook Pro with Touch Bar

My Touch Bar’s control strip now has this configuration:

Screenshot from Author’s MacBook Pro with Touch Bar

Pressing this icon will open a new menu on the Touch Bar with all our Quick Actions. Just pressing these buttons will trigger the corresponding workflow. One touch, that’t it!

Screenshot from Author’s MacBook Pro with Touch Bar

Our Automation in Action

Upon pressing the Simple Safari button we added to the Touch Bar, Safari reduces to my 5 essential tabs. 🎉

Screen Recording from Author’s MacBook Pro with Touch Bar

Conclusion

There are an endless number of ways you can leverage Automator for your needs. Pre-built actions allow all mac users, beginner and advanced, to construct robust workflows of any scale. I encourage you to play around with the application and find more ways to further personalize your machine, all while saving time in the long run.

Quick Actions are just the tip of the iceberg when it comes to Automator. If you’re truly in love with automation like me, explore Automator’s other presets and tools, and continue to find ways to simplify how you interact with technology.

Remember, if a task requires more than five minutes per day, spend five minutes automating it.

--

--

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
Blake Sanie

Blake Sanie

51 Followers

‌‌‎Inquisitive student.‎‌‌ Aspiring engineer. Photography enthusiast. Curious stock trader. blakesanie.com