Feature Request: Ability to run an Apple Shortcut when ticking off a task

It would be really useful if there was a way to run an Apple Shortcut when ticking off a completed task.

1 Like

How often is this needed? At the risk of keeping it simple, why not create an AppleScript that completes the task and does what you want next? Add that AppleScript as a button action on the OF toolbar. Alternatively/In addition, create a macro for it using any one of the third party tools for such (e.g. Keyboard Maestro).

ā€“
JJW

I have several tasks that repeat daily where it would be really useful to be able to trigger running an iOS Shortcut when they are marked as completed.

Iā€™m not sure it is even possible to create an Applescript to tick off a daily repeating task. Do you know how to accomplish this? The other problem is that this would not work on the iPhone which is where I need it. At least iOS Shortcuts work on both iOS and macOS.

Your workarounds would not solve my problem. The best solution would be to have a shortcut trigger when you tick off the task in OF on iOS which is why I am requesting support for that.

OK. You did say Shortcut not Script.

In any case, as far as I know, OF script automations can be run on all platforms. It is a matter of writing the script in JXA rather than pure AppleScript. Perhaps someone who is better-versed in JXA can provide the template.

ā€“
JJW

Not JXA, which is a JS interpreter with an interface to the macOS-only osascript (Apple Events) system, as used by AppleScript. There is no scope for Apple Events, or osascript, on iOS or iPadOS.

Omni Automation uses a different instance of a JavaScript interpreter (not JXA) with a different (and, as you say, cross-platform) interface to each Omni application. JXA code for OmniFocus is not transferable to Omni Automation code. It uses a different object model, with different methods and properties.

See, for example: Omni Automation

The clarification is appreciated.

ā€“
JJW