Interacting with Notes app

Is there a way to interact with the Notes app?

For example create a note programmatically?

Depends on the interaction and the platform.

Assuming you are using the Apple Notes app on Mac/iPhone/iPad, Shortcuts supports the creation of notes with the “Create Note” action. However, it cannot create all types of content combinations. So once again, it would depend on exactly what you are trying to do.

I’ve done it a little with a mix of Alfred and Shortcuts.

It is still a work in progress so the README might be a little out.

Thanks for the reply @sylumer. Yes it’s the Notes app on iOS.

I’d like to programmatically create a new Notes app note from a template. I would be able to pass in data, that would get inserted into the note when it was rendered from the template.

You mention Shortcuts, I haven’t had much luck with Shortcuts. That’s one of the reasons I’m trying out Scriptable. Being able to do everything in JS is preferable to Shortcuts IMO.

Can the Shortcuts create note function be triggered from Scriptable?

What do you suggest for what I’m trying to achieve?

Hi @pearcen, thanks for the link. I’m not sure how I could use your code because it’s for Alfred (on mac?) and Notesy, however I am trying to use Scriptable and Notes on iOS.

It is not explicit, but I assume from this you are talking about text data only.

Yes - there are a number of discussions on this forum about calling Shortcuts from Scriptable.

While you could call Shortcuts from Scriptable using the x-callback-url, you could also put your JavaScript in a Scriptable action in Shortcuts. I would suggest you review both approaches.

Given it is iOS, I think your only viable option is to utilise Shortcuts. I’m not sure why you would not have had much luck with Shortcuts, but the a create note action sounds well suited for what you want.

I spent hours trying to get something working, I just couldn’t even get the most basic things to do anything. Somehow I find their particular low code implementation extremely unintuitive.

I was trying to get the url and / or title of the currently playing podcast episode into the shortcut to then add to the note.

However I couldn’t even figure out if the podcast integration was passing the url or title in or not. It seemed not to work when offline. I need it to work when offline.

At least with scriptable it’s somewhat familiar, ie javascript files running in a NodeJS-like runtime.

I think having the main logic in Scriotable would be better because I could save the script in an external file.

So if I was to trigger Shortcuts via Scriptable, how would I pass in the text that would get inserted into the note?

Here is the Shortcuts URL call documentation.