In your scripts, where you specify the file that should be processed, you can't leave it like that when using it in Hazel, since the file changes. Hazel will send in the full path to that file as an argument. The script editor will tell you how to specify that based on the shell/languages you choose.
I'm a newbie and I'm looking for automator workflow what sync my documents and picture folder between Macbook Air and Imac; is there any Hazel rule with an automator workflow? I have the network connection, but don't know how to run the automator workflow; maybe with a script? anyone can help? Highly appreciate your support. thank you.
Is there a reason why you need an Automator workflow for this? There is the built-in Sync action in this case. I suggest checking the manual (there's a whole chapter dedicated to syncing one folder to another).