I am trying to do a similar thing, i.e. have PDF files gathered in Zotero, saved in a dropbox folder, and sent to a notebook in EN.
How and what exactly did you embed into the Hazel script? I have selected Run Shell Script and entered the code referenced above, but it will not work.
I have tried running it through AppleScript, but experienced the same problem regarding theFile being "undefined." I changed the file name in AppleScript to correspond with the folder, but I only get a .zip of the file itself placed into the EN notebook.
I basically want PDF files to be sent to EN