I’ve been using Hazel on the Mac for some time to automatically move my scanned documents to the appropriate folders, but the process of naming those documents had been largely a manual process, so I thought it was about time I got this automated.
With lots of help from the likes of David Sparks and other automation gurus, I’ve finally developed a workflow that suits my needs.
First, a little background.
I work away from home a lot, and accumulate a lot of documents and receipts during the course of a day. I tend to let these build up until there are so many that I get annoyed with them and finally decided to deal with them. By dealing with them, I mean scanning them with my trusty ScanSnap S1100 which travels everywhere with me.
These scans go into a single folder on my desktop to start with. From here, the new automation process kicks in.
My new workflow
I have now set up Hazel to extract dates from the scanned documents and use that for the first part of the filename. As I have multiple documents for any given date, I also add an automatically incrementing number to the filename, so I end up with something like 2014-02-27 - 0000000123.pdf.
Once Hazel has processed its rules, most of my scans documents now have a filename I can work with. For the few that Hazel missed, I manually change the filename to match my rules.
I then need to look at each document to see exactly what it contains, so I can refine the filename. I’m dealing mostly with expense receipts, so what I ultimately want to end up with is something like 2014-02-27 - expenses - coffee.pdf.
Here’s where the new addition to my toolbox comes in - Keyboard Maestro.
I’ve created a bunch of macros for Keyboard Maestro, all associated with hotkey combinations. I will have a look at a particular scanned document, determine its contents, and hit the hotkey combination I have defined for that type of document. Keyboard Maestro will then use a regular expression to replace the numeric part of the file name with, for example, expenses - coffee. So, my document that started with the name 2014-02-27 - 0000000123.pdf gets renamed to 2014-02-27 - expenses - coffee.pdf.
I had previously created some rules in Hazel that would look for words like “expenses” and move those documents to the Expenses folder in my Dropbox account, so this renamed file now automatically gets moved to the correct place. I have DevonThink indexing my Dropbox folders and so they automatically appear there as well.
So, from scanning a document, most of the time all I need to do is glance at the resulting PDF and hit a hotkey for it to be renamed, moved to the correct location and appear in DevonThink.
This is all rather magical to watch :-)
I’d like to thank everyone who has shared all of their automation tips. I have picked up little bits and pieces from all over the Internet and I’m afraid I've lost track of what information I got where, but if you’d like to know more, a quick search for “Mac automation” should see you right.