Get currently selected note using Applescript or x-callback-url


Is it possible to get the ID or name of the currently-selected note(s); either using Applescript or x-callback-url or some other way? I’d like to be able to perform an action on the current note.

At the moment, my only workaround is to use the Share menu - but there are a lot of clicks involved, and I don’t think it’s possible to actually get the identifier out through that (only the title and content; which would render the identifier unnecessary but may not be unique).

Additionally, is there a way to get all notes; so that I can loop through them, for example, and perform an action on each?



Good news, we’re adding x-callback-urls to get the ID of the currently selected note and project to Agenda 14. In future updates more elaborate read-api’s should follow as well.

1 Like

Excellent! In the meantime I found a cool workaround. The Hook app can get the link of the selected note, and it’s kind of neat. They use AppleScript to trigger the command-l shortcut. I was able to use that technique in my own AppleScript and parse out the ID and title… it works nicely!

1 Like

Update: In Agenda 14 it is possible to retrieve the identifier and title of the currently selected note or project using x-callback-urls: X-callback-url Support and Reference

1 Like

Oh wow - that is awesome, and a much more solid option than my workaround. Thanks for adding that!

1 Like