AppleScript: Link Notes text to Pages file in iCloud

Desktop ~ Possible to apple script something in the Notes app like linking some text to open a Pages file on OS26

Pages file stored in iCloud

MacBook Pro (M4 Max, 2024)

Posted on Jan 23, 2026 11:05 PM

Reply
1 reply

Jan 25, 2026 6:25 AM in response to Southern Group

I don't think so. All I could make work was to create a url that would show the file location in Finder. You can also create an iCloud link to the file using Shortcuts, but that doesn't open the file, either. It just opens a webpage to download the linked file.


To create a hyperlink to a file, you can use the file:// protocol. It probably could be scripted, but I couldn't find a way to specifically add a link to Notes via AppleScript. You could certainly create a script to prepend the "file://" protocol to the pathname so you could just paste into the Add Link dialog.


In Finder, copy the file while holding down the option key to "Copy as Pathname."

In the Add Link dialog in Notes, type "file://" in the url and paste the path you copied. You can make a shortcut that does that and puts it all on the clipboard:

And the iCloud version:

Unfortunately, the Add Link dialog doesn't accept the pasted URL. You have to paste it into the Note, then edit the link to change the name to the file name (or whatever).

AppleScript: Link Notes text to Pages file in iCloud

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.