Pragmatism in today's world

Saving the current URL to a Note

Inspired by John Gruber mentioning on the Cortex podcast that he has a shortcut that saves links to a note in Tot, I thought I’d do something similar for saving to a note in Apple Notes.

I want to store as a bullet item containing the name of the page, the link and the date. Something like this:


Saved link text light.

(Funny that the spellchecker doesn’t know that Thu is the short form for Thursday)

This is the shortcut that I created to do it:
Save links to notes shortcut light.

You can download it here:
https://www.icloud.com/shortcuts/6c12e888f9da431d9977985b229d636b

Breaking down the actions

To get the URL into the shortcut, we want:

  • Show in Share Sheet so that it’s available on iOS/iPadOS
  • Receive What’s Onscreen so that when a browser is focussed on Mac, it finds the URL
  • Use as a Quick Action so that we can assign a keyboard shortcut (⌃⌥⌘U in case)

We can then use Get Contents of web page along with Get Details of Safari Web Page to get the pages’s title which Shortcuts calls Name for some reason.

There’s an action for Current Date, so we add that to get the variable.

Creating formatted text in a note is a little involved. Firstly we use a Text action to set out the Markdown that we want. I used the date format EEE, dd MMM yyyy as it’s short and clear to me.

There’s a Make Rich Text from Markdown action which processes the Markdown for us, but if you just append it to the note, it doesn’t work. The workaround is to add it to a List action and then append the list to the note.

That’s it

All we need to do now is show a notification including the Shortcut Input variable as that’s the URL that we’ve just saved.
Save links to notes notification light.

With this shortcut, I can add a new entry to my note from both my Mac, iPad and iPhone with minimal effort.

I like it.

Thoughts? Leave a reply

Your email address will not be published. Required fields are marked *