Hazel Automation

Hello all,

Need some automator geniuses to help and point me in the right direction.

I am working in a salesforce environment. When a sales person creates an estimate a pdf is created on the server that has the following file format

projectestimate_(4 digit code)clientcode_(four digit code)projectcode_quotedescription.pdf

When the file is created I want hazel to look at the file name and create a folder using the clientcode & projectcode. Put the following subfolders into that master folder (Estimate, Project Info, Contract). Once the folder structure is created copy the estimate into the estimate subfolder.

so from the pdf we would get the the following structure auto-magically!

Estimate (Pdf is copied here)
Contract (empty folder)
Project Info (empty folder)

Is Hazel the right tool for this?

Hi @riltis

You can certainly use Hazel as the trigger for starting the process when an estimate is created in the monitored folder. You can use Hazel to create the top level folder (ClientCode_ProjectCode) and the Estimate subfolder as well as moving the PDF into the Estimate folder. I’m not sure Hazel would directly be able to create the two empty folders, however Hazel can run a Shortcut when it matches a file. The Shortcut could be used to create the two empty folders, or it could be used to process the whole action.

I’m not at my Mac at the moment so not able to show any more detail at present but you are definitely on the right track.

Can you give a specific (sanitised) example of the filename as it would actually be and we can have a look better at helping.

You mean, like this…

And now for the magic trick…


PS: Not done in Hazel.