Jump to content

How to launch workflow from shell script?


Recommended Posts

Hi,

 

Have a workflow I would like to launch from within a shell script.

 

Tried URL handler, but get an error:

open alfred://runtrigger/com.alfredapp.vero.gettingstarted.snippettrigger/sniptest/?argument=test

error:

zsh: no matches found: alfred://runtrigger/com.alfredapp.vero.gettingstarted.snippettrigger/sniptest/?argument=test

 

applescript seems to work ok though:

tell application id "com.runningwithcrayons.Alfred" to run trigger "sniptest" in workflow "com.alfredapp.vero.gettingstarted.snippettrigger" with argument "test"

 

Any suggestions?

 

Thanks

 

L.

Link to comment

You have a ? in the URL, which has special meaning in the shell. As such, you have to quote the text:

 

open 'alfred://runtrigger/com.alfredapp.vero.gettingstarted.snippettrigger/sniptest/?argument=test'

 

You can also use the AppleScript from a shell script:

 

osascript -e 'tell application id "com.runningwithcrayons.Alfred" to run trigger "sniptest" in workflow "com.alfredapp.vero.gettingstarted.snippettrigger" with argument "test"'
Link to comment
  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...