Running Shortcuts from Hazel

Hi there,

I’m trying to use Hazel to run a shortcut when there is a new subfolder created in a top level folder. The shortcut should take the name and filepath of the folder and create a new file and append some text to it.

Unfortunately, when I try to run the shortcut via hazel I get the notification “error executing shortcut via commandline.” Anyone know what’s going on here? This isn’t the first time I’ve gotten this error. I’ve tested the shortcut independently of hazel and it works fine. I’ll post the shortcut here:

Thank you for any help. This is so frustrating!

1 Like

I don’t know if you resolved this, or if you figured out this workaround already, but I ran into the same exact issue: tested the shortcut independently, works without issue, but running from Hazel is a no-go.

Instead, what I did was chose “Run shell script” and in the embedded script, I just put ‘shortcuts run “Name of my Shortcut”’ (without the single quotes, but keeping the double so I don’t have to escape the spaces), and it works like a charm!

Hopefully this helps you or any others that run into this issue.