How/Why do you use Shortcuts [on macOS]

Hi MPUers, I hear a lot of buzz around Shortcuts coming to macOS, but I figured out what people use it for if they have Keyboard Maestro or Alfred or LaunchBar as their primary automation app. I mean you could do everything with these apps (and much more). So why use shortcuts?

PS: I find that I can do everything with Alfred for automation, either with a workflow or AppleScript or shell script. Backing up / sharing these automations is easy too since everything is in one app, rather than trying to hook/backup two apps.

I use Shortcuts mainly for controlling my lights in Home.
I also have one for adding transactions for personal finance and an AQI calculator.

Basically, little things that I want access to on my phone and my computer.

Partly out of curiosity. :slight_smile:

More seriously, MindNode has a Shortcuts action for exporting to Markdown. It’s part of a - pretty ropey - shortcut I use to get a presentation outline out of MindNode.

So, a specific action got me trying to use it. But for now most of my stuff WON’T be using Shortcuts on Mac.

I use shortcuts on the mac mainly to start other automations in Keyboard Maestro or run applescripts/shell scripts. These shortcuts are “universal” and I’ve created them to work across iOS, iPadOS and macOS.

1 example is picking up the youtube URL in the browser and sending that via ssh to my mac mini to download using youtube-dl, move it to my Plex server and opening the Plex app once completed

This starts in Shortcuts → ssh goes through shortcuts → youtube-dl → Hazel picks up the changes in the downloaded file → moves to Plex → KM then opens the Plex app in the background

I don’t right now, mainly because I highly prefer just writing Python scripts, but I’m planning to check if there are useful Shortcuts-specific actions that I can play around with.

1 Like

Wow, this seems cool. Could you share that Shortcut please, would love to see the flow in it!

I have 2 shortcuts - one that switches from a book’s page on amazon.com to the same book’s page on amazon.co.uk, and one that switches in the other direction. I could have 1 shortcut, but this is good enough.

Aside from some uses others have shared, I use it to retrieve data when I regularly refer to the same API source.

Actually the shortcuts themselves are not that difficult to make:

  1. create a shortcut pulling the youtube URL (get URL), asking me for a title (deliberate) and putting it in a text line to output to the SSH shortcut

/bin/echo -n “%variable%” > ~/temp/youtube-test/"%variable%".txt

  1. the SSH sub shortcut
    This shortcut is uniform and simple, it just takes all the input and passes it to a specific machine using ssh.

  2. hazel on the mac then picks up the file, runs a shell command

url=$(cat $1);yt-dlp -o $1.mp4 $url

taking the youtube url, downloading using yt-dlp and renaming the output to the title put in in step 1

  1. hazel then sorts the movie into a directory with the same title as the name and moves all that into my Plex movies folder.

  2. Hazel then triggers a KM macro to open up Plex in the background on my iMac so I know it’s finished and I can check the video.

In all of this I’ve tried to create distinct simple steps so I can immediately see where things break, or what needs changing. I could just put all of this into 1 script on the mac, but instead I chose to add single actions for easy error checking. (1 shortcut to get the input, 1 shortcut to transfer, 1 hazel rule to start the script, 1 hazel rule to rename and sort, 1 hazel rule to start KM)

doing short little steps also allows you to re-use those steps elsewhere, without breaking the routine.

also: credit where credit is due
I did not come up with this 100% by myself, I simply adapted from @tjluoma’s post here, and other posts related to that one:

2 Likes

If you are experimenting or actively using Shortcuts on macOS, be sure to get a copy of the indispensable Actions (click to see their Git page) app from the Mac App Store. It’s free, and adds a long list of useful actions to Shortcuts. The developer has been steadily increasing the features available in actions and is very open to suggestions.

Actions on the App Store:

Another oddly useful app is One Thing, which just puts a line of text into the menubar on the Mac. The useful part is that it has a Shortcuts action, so you could, for example have a shortcut that puts the “next action” from a list in Reminders into the menubar so that it’s in front of your eyes.

One Thing on the App Store

5 Likes

Regarding One Thing, I saw this on @ismh’s 512 Pixels and downloaded it immediately. I didn’t think about shortcuts integration, so that’s helpful.

I’ll check out Actions. I am pretty new to shortcuts and see so many possibilities!

1 Like

Thank you! I now have adapted my air quality shortcut to give me indoor/outdoor pm2.5 from my HomeKit sensors, and send it to the menubar.
Keyboard Maestro runs it every minute to keep me updated.

Hopefully this will not tax my computer like BitBar seemed to when I tried that method a while back.

1 Like