Pushcut and Hazel

I have a Pushcut webhook url in an AppleScript in Hazel. I want Hazel to run the script after moving files from my Dropbox to an iCloud folder. The Pushcut
then triggers a notification to my phone that the files have been moved and do I want to run a Shortcut. When my computer screen is not locked it works fine but after awhile when my screen is locked the Pushcut does not trigger. It’s interesting too that when I move my mouse and my screen comes on BUT before I type in my password the Pushcut triggers. I don’t have my computer sleeping when it is locked. I want to be notified by Pushcut while I’m at work and away from my home computer. And I don’t want to leave my home computer unlocked. The AppleScript tells Safari to open and to go to the Pushcut web hook URL and that triggers the notification.

What about trying a shell script utilising curl so that there’s no GUI app involved?

1 Like

Ha. Sounds like a great idea. Except I don’t know about shell scripts or curl. Im a quick learner though. Can you send me an example?

Okay, well this a good opportunity to learn. Examples are in effect a part of Pushcut as you should get from the below.

A couple of minutes Googling later and I think this should open up an exciting new world of automation opportunities for you. People have been automating from the command line using shell scripts for many decades…

From this last one, this should be the most pertinent part for curl triggering.

Hope that helps.

3 Likes

This looks very useful. And like you said opens up a whole new avenue of automation. Thanks for heading me in the right direction.

If you get stuck, feel free to ask questions. I’m sure there are a few of us who would be willing to help, but it is best to see how far you can get before asking for help, because then you tend to understand it more and will hopefully be able to learn more from it.

1 Like

Shell script in Hazel worked like a charm. Thanks for opening up a whole new world of automation.

1 Like