URL to a plug-in?

Hi there – I couldn’t see anything about this on omni-automation.com or this forum.

Is it possible to get a URL to fire a specific plug-in? I’m hoping to create an iOS Shortcut that will run a plug-in.

Yes, it is possible. For example, if you have a Plug-In with com.company.test as its identifier, containing an action named Active Projects, you can invoke it and get callback results into Shortcuts with: PlugIn.find('com.company.test').actions[0].perform('Active Projects')

This could be done inside OmniJS Context or URL-encoded in a string to be opened with Open URL Shortcuts Action, for example.

2 Likes

Thanks – that worked a treat!

For anyone else reading the thread – I used:

omnifocus:///omnijs-run?script=<URL ENCODED ACTION>

3 Likes

When I use a url such as the one specified above, OmniFocus asks me to confirm to that I want to run the encoded script. Is there a way to skip this step?

This way if running a script from Shortcuts with the Open URL action, it saves a tap

Yes. For example, to bypass that dialog for two weeks, use:

omnifocus:///change-preference?OJSBypassPreviews=2w

Source:

https://omni-automation.com/script-security.html

1 Like

That worked, thank you very much!

I ended up downloading and using the script at the bottom of the page linked above (https://omni-automation.com/script-security.html)

1 Like