Quicker linking to apps in Drafts

Today on the Automators forum, there was a question about using Shortcuts to get the current version of an app in the App Store. When I read the answer, from Stephen Millard (@sylumer), I immediately knew I could modify his shortcut to speed up linking to apps, something I do quite often here.

Up until now, this is how I’ve been linking to an app:

  1. Open the App Store app.
  2. Search for the app I want to link to.
  3. Get the app’s URL from the Share Sheet.
  4. Return to Drafts, which is where I’m writing the post, select the text I want to turn into a link (typically the name of the app), and run the Markdown Reference Link action from @pdavisonreiber.

Because the App Store doesn’t open in search mode, this can take half a minute to a minute to do. Even worse is the context shift as I switch from Drafts to the App Store and back. By stealing Stephen’s shortcut and making a Drafts action that glues it to @pdavisonreiber’s action, my workflow has been reduced to

  1. Type the name of the app and select it.
  2. Run the App Store Link action.

which runs in just a few seconds, requires no intervention on my part, and has no context shift other than me watching the screen change from Drafts to Shortcuts and back.

Here’s my adaptation of Stephen’s shortcut. It grabs the App Store URL of the given app and puts it on the clipboard

StepActionComment
0 App Store URL Step 00 I won’t be running this from the Share Sheet, but I have to set it up as if I will so it accepts text.
1 App Store URL Step 01 Search the App Store for the given text. We have to have some faith that the search will work.
2 App Store URL Step 02 We also have to have some faith that the app we’re looking for is at the top of the found list.
3 App Store URL Step 03 Get the URL of the app.
4 App Store URL Step 04 Put it on the clipboard so it’s ready to be used in the next step of the Drafts action.

The App Store Link action consists of two steps. The first runs the App Store URL shortcut, passing it the selected text.

App Store Link Shortcut step

The second step runs the Markdown Reference Link action, which uses the URL on the clipboard to turn the selected text into a link.

App Store Link Include Action step

So by doing virtually no work of my own, I have a new Drafts action that will save me upwards of a minute every time I need to link to an app and doesn’t take me out of the flow of writing.