If statement question

I need to use an if statement to check if a note exists, if it doesn’t, create one. That’s important because if it exists, the shortcuts must get its text and send to the next action. Is there a way to do it?

You can certainly try to get a note based on title or identifier. If you do that, and it succeeds, you could get the data.

Seems there is an if in shortcuts (I’m no expert): Use If actions in Shortcuts on iPhone or iPad - Apple Support

The issue is if the note doesn’t exist and that’s the condition I’m looking for. If it doesn’t exist, create a new one with “x” name

Sure, but I assume you get something back from the request for the note, right? Like an error message? You could test for that in the if.

In x-callback-url, we do give an error. I am not sure how that translates into Shortcuts.

1 Like

Hmm, you’re right. Yep, will try that.
I know nothing about x-callback-url, but it is such an important tool that I will try to learn it now. Thanks

I’ve found this useful. Home | x-callback-url

1 Like