I'm working on a solution to automate sorting of faxes coming into a physicians office. I've made a fair bit of progress using PDFpen to OCR the files received and sorting them into sub-folders based upon keywords, which works very nicely.
The next step is renaming the files. Ideally, I'd like to search the documents for fields such as "Patient Name:" and then take the next couple words and attempt to rename the file..
ie -- "CONSULT-20151206-154122.pdf" becomes "CONSULT-Doe, John 1.pdf".
Is this possible with Hazel? Anybody have any suggestions or tips to help me out?!

Thanks in advance,
- Tim