Making DT3 and hazel play nicely? (DT to Hazel)

Hazel’s USP is that it watches over folders and handles files arriving in these folders. So you’ll have to export your files from DT to a folder somewhere in your filesystem that Hazel watches over.

There’s the export menu in “Files” to do that. It does not seem to be available directly in smart rules, but you can script that.

So while in theory it is feasible, I doubt that it’s a smooth process. Because after you’ve processed your files in Hazel, you’ll have to reimport them into DT, preferably into the correct database/group. And on top of that (or rather before that), you’ll have to provide Hazel rules for all your documents. Which is easier to do than in DT, but it’s still a fair amount of work.

I once tried to do something like that (in fact, I even OCR’d stuff from Hazel using PDFPen): Process everything in Hazel and then add it to DT. Since that involved a fair amount of scripting (for the “move to the correct database/group” part) anyway, I dropped the idea in favour of a smart rule basically running a (longish) script that does everything™: OCR if necessary, extract the date (depending on the kind of document) and use it to rename the document, add tags if needed and save the amount (for invoices) in a custom meta data field.

The script is here

It’s provided as is with no warranty. You’ll have to adjust the data at it’s beginning to reflect your documents and database structure. Some of that is discussed in the thread.

1 Like