THIS WEEK'S SPONSOR:

Kolide

The Fleet Visibility Solution for Mac, Windows, and Linux to Help You Securely Scale Your Business


Creating Lock Screen Widgets for Specific Notes via the Apple Notes URL Scheme

All I wanted was a widget.

All I wanted was a widget.

A few days ago, as I was playing around with my Lock Screen on iOS 16, I wondered: would it be possible to use the hidden Apple Notes URL scheme to create widget launchers to reopen specific notes in the Notes app?

That led me down a fascinating rabbit hole filled with hidden Shortcuts tricks and discoveries I thought would be useful to document on MacStories for everyone to see.

You know, for posterity.

It all started with the idea that I wanted to use the Widgetsmith app to make a Lock Screen widget to open an individual note in the Notes app. I have a ‘Scratchpad’ note I keep in Notes, and I wanted a one-click button to launch it from the Lock Screen. As I explained in my iOS 16 review, the Notes team hasn’t built any Lock Screen widgets in iOS 16, but I figured I could fix the problem myself by using the undocumented Apple Notes URL scheme that’s been an open secret in the iOS automation community for the past few years. There are multiple layers to this technique, so let’s dig in.

First, let me explain my position. If you want to make a simple widget that opens a specific note in the Notes app, you can also do it by using a shortcut. The Shortcuts app has an ‘Open Note’ action that you can point to a specific note, and that will immediately reopen it in the app. Then, you can use an app like LockFlow (once again, because Shortcuts doesn’t have Lock Screen widgets) to turn that shortcut into a Lock Screen launcher, and it’s going to work just fine.

If you want to open a note with Shortcuts, it's as easy as doing this.

If you want to open a note with Shortcuts, it’s as easy as doing this.

However, since I knew of the existence of an Apple Notes URL scheme, I wanted to remove the Shortcuts dependency and come up with a solution that wouldn’t involve creating a shortcut upfront. Think about it: if you create a launcher that relies on a shortcut, if the Shortcuts app crashes upon triggering the shortcut, then you’ve defeated the whole purpose of creating a quick launcher altogether. Given the…problematic state of Shortcuts for iOS 16 at the moment, I figured that it was preferable to invoke Notes directly via its own URL scheme.

Now, something you should know about the Notes app is that it’s had a hidden URL scheme to reopen individual notes for years. The URL scheme, which is unchanged in iOS 16, is the following:1

mobilenotes://showNote?identifier=UUID

As you can imagine, the URL scheme uses a unique identifier (UUID) to reopen a specific note in the app. I’m not 100% sure about this, but I believe this URL scheme is the one Apple itself uses behind the scenes to open notes directly via widgets, shortcuts, and deep-links generated by Siri.

Unsurprisingly, Apple doesn’t want you to worry about these UUIDs, and they do not advertise this URL scheme anywhere in iOS, except for one obscure place: the Content Graph action of the Shortcuts app.

Without rehashing what I wrote eight (!) years ago about the Content Graph in the Workflow app, it is essentially the engine that tells Shortcuts how to interpret data that gets passed in and out of actions. The beauty of this approach is that, if you know what you’re doing, you can poke around in the Content Graph engine itself and take a look at the raw data representations of each data type using the ‘Show Content Graph’ action. It’s wild, and it looks like this:

The Content Graph in Shortcuts.

The Content Graph in Shortcuts.

This context is necessary to understand where I’m going with this. I don’t know who first did this, but a few years ago someone in the automation community realized that you could look at the raw representation of a note from the Notes app inside the Content Graph and find its identifier and URL scheme. There are various Reddit threads about this technique. That was the only way to find the UUID of a specific note: you had to invoke the Content Graph and manually select a note’s UUID to copy it. There was no action in Shortcuts to programmatically extract the UUID of a note, nor was the UUID a property you could extract from a ‘Note’ variable. All you could do was combine the ‘Find Notes’ and ‘Show Content Graph’ actions, open the graph, and manually copy a note’s identifier out of it.

So, as I was putting together my widget launcher for the iOS 16 Lock Screen earlier this week, I naturally tried to follow the same approach I’ve been using for years. And much to my surprise, I noticed that Apple had changed the representation of a note in the Content Graph with a different format for identifiers, as shown below:

The new identifier format in iOS and iPadOS 16.

The new identifier format in iOS and iPadOS 16.

Obviously, that’s not a valid URL scheme. But in looking at the string of text inside the identifier field, it seemed to me like the last part of it was a UUID, so I just copied that bit and tried it in Shortcuts…

This is the note's UUID.

This is the note’s UUID.

…and it didn’t work. At this point – you know me – I had to keep going. I reached out to a few folks in the Shortcuts community, and they had been equally stuck with UUIDs for individual notes reported by Shortcuts in iOS 16. That wasn’t an encouraging sign.

After wasting way more time than I’d like to admit on this problem, I’m pleased to say that I was able to get this to work. And as is often the case with these things, the “fix” is the silliest thing you can imagine. So here we go:

In iOS 16, Shortcuts’ Content Graph action shows note UUIDs with a lowercase format; they should be uppercase instead. That’s it.

I don’t know why Shortcuts is doing this in iOS 16, but that’s your fix if you’re trying to use the old approach for copying note UUIDs: convert them to uppercase, and they will start working again.

To simplify the process of grabbing note UUIDs and generating URL scheme launchers for them, I created a shortcut that you can download for free today. To use the shortcut, type the title of a note you have in the Notes app, select it from a list of results, and the Content Graph will open.

Search for a note by name, confirm the result, and open it in the Content Graph.

Search for a note by name, confirm the result, and open it in the Content Graph.

At this point, find the blue node labeled ‘Note’ and tap it:

Next, select the ‘LNEntity’ type from this list:

Finally, copy the alphanumeric UUID that is contained inside the identifier field. It comes after the NoteEntity/notes:note/ part and before a comma, like so:

Once again, this part is the UUID of a note. Select it and copy it to the clipboard. This is the only way to get this detail out of Shortcuts.

Once again, this part is the UUID of a note. Select it and copy it to the clipboard. This is the only way to get this detail out of Shortcuts.

That’s it! The shortcut will then convert the UUID to uppercase and assemble the proper Apple Notes URL scheme to reopen the selected note. To test this, paste the URL in Safari, and you’ll see that a specific note will open in the Notes app:

In my case, once I had this system working again, I opened Widgetsmith, created a Lock Screen widget, and gave it a custom URL scheme generated by Shortcuts. Then, I installed the new widget on my Lock Screen, and I now have a pretty icon that launches the note I want directly from the Lock Screen:

Creating a Lock Screen widget for Notes in Widgetsmith.

Creating a Lock Screen widget for Notes in Widgetsmith.

Like I said, I wanted to document this for all the Notes and Shortcuts users out there who may have come across this change in iOS 16 and have been unable to figure it out.

In addition to quick launchers, there are other potential applications for having local URLs that point to specific notes in the Notes app. For example, the same system could be used to add a wiki-linking functionality (reminiscent of Craft and Obsidian) to Apple’s Notes app. Which is exactly what I’m going to document in the Monthly Log for Club MacStories members later this week.

In the meantime, you can download my shortcut to generate note URL schemes below and find it in the MacStories Shortcuts Archive.

Copy Note UUID and URL Scheme

Find a note in the Notes app and copy its UUID from the Shortcuts Content Graph. The shortcut uses the UUID to generate a URL scheme launcher for that specific note in the Notes app.

Get the shortcut here.


  1. The URL scheme is different on macOS, but I’ll talk about this in the Monthly Log later this week. ↩︎

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.