We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message

How I went paperless with Hazel and Evernote

Evernote has become my paperless filing cabinet for everything from receipts to tax documents. One of the things I use it for most frequently is to file the monthly statements for my phone, cable, and other accounts.

In the past, those statements would arrive by mail, and I'd use my trusty ScanSnap to scan and file them in Evernote. Today, most statements are available online, and I'm able to skip the paper altogether. Instead, I download a statement and import it into the appropriate Evernote notebook along with the appropriate tags. Then I just delete the original.

That process isn't necessarily difficult, but it is tedious and repetitive. Multiply it by the half dozen or so statements I receive in any given month, and it's easy to see why I decided to automate the process.

The key to that automation is Hazel, a utility and System Preferences pane that can monitor a specified set of folders and perform actions on files in those folders based on rules you've defined.

To show you how it all works, here's how I use Hazel and Evernote to automatically file my monthly cable bill.

Identify and rename

The process starts by downloading the PDF of my bill from my cable company's site to my Downloads folder. This part is still a manual task, but it's my last hands-on involvement with the document.

I have a Hazel rule that monitors the Downloads folder and looks for my cable bill. A Hazel rule must be based on something unique about the document you want it to act on. In this case, I use Hazel's SourceURL/Address criterion: My Cox Cable bill is the only document I regularly download from cox.net, so I start my rule by looking for any document for which the sourceURL/Address contains cox.net. It may take some trial and error to find unique criteria for the documents you want Hazel to identify, but you can usually come up with something.

When Hazel spots a bill from Cox Cable, I want it to do three things: rename the document, import it into a specific Evernote notebook with specific tags, and finally delete the original document.

Renaming is the first action Hazel performs on documents matching my cable-bill criteria. The first part of my new filename is based on the date the file was downloaded, which is likely the same month as the statement itself. I format the date YYYY.MM, using leading zeros when appropriate to keep the format computer-friendly and easily sortable. For monthly statements like a cable bill, I usually don't include the day (DD), because it's irrelevant.

The second part of my filename includes a description. For the cable bill, it's pretty simple: A March 2013 cable bill would be named 2013.03 COX.pdf.

AppleScript in Hazel

Now that the file is renamed, the next step in my process is to import the file into my Statements notebook within Evernote and apply tags. For this process I use a bit of AppleScript. Within Hazel, after the renaming step, I choose Run AppleScript as my next action. I can either embed the appropriate bit of AppleScript within my Hazel rule or link to an existing script. The template for the scripts I embed in my Hazel statement rules is:

tell application "Evernote" activate create note from file theFile notebook {"Notebook Name"} tags {"tag1", "tag 2", "tag 3", "tag 4"} end tell

(Note: Everything from create to "tag 4"} should be on one line.)

For each kind of statement, I replace Notebook Name and tag1 and so on with the actual notebook names and tags I want to apply. (If you don't use tags, you could just remove that portion of the script.) Because I'm prone to forgetting this string of script or mistyping it, I've created a TextExpander snippet with fill-in fields for the Notebook names and tags so I can configure my script on the fly. I click the compile button within Hazel when I'm finished with my script and am ready to move on to my next action.

Last steps

In many cases the next step is to have Hazel delete the original PDF statement. But sometimes I have to take other actions first.

For example, my employer reimburses me for my cell phone expenses. So for the Hazel rule associated with my cell phone statement, I've added a step that runs an Automator action that attaches the file to an email addressed to my bookkeeper with a short message. (First, the Get Selected Finder Items action takes the document we're working on with Hazel. Second, the New Mail Message action generates the email with the file as an attachment. I fill out the appropriate details, such as the email address and subject, a message, and the account from which I want to send the message.)

When I'm done with everything, my last action in Hazel is to delete the original downloaded file; since I've already saved the file to Evernote I don't need the duplicate PDF cluttering my Downloads folder. I use the move action within Hazel and select the Trash as the destination.

Once they're safely stored in Evernote, my documents are available for quick reference on my various Macs, iOS devices, and the Web for me to pull up at a moment's notice without my having to mess with paper or rely on service providers to keep copies.

Even if you don't use Evernote, Hazel can still help you manage downloaded documents by automatically renaming and filing them to an appropriate folder. Similarly, if you're scanning files instead of downloading, you could adjust this workflow to monitor a scanned documents folder. Once you have the basic structure of a Hazel rule set up, you can duplicate it and adjust the criteria for all sorts of documents.

IDG UK Sites

Samsung Galaxy S5 mini vs HTC One mini 2 comparison review: Design and price beats additional...

IDG UK Sites

Why local multiplayer gaming is rapidly vanishing: we look at the demise of split-screen and LAN...

IDG UK Sites

Colour-depth not resolution is what will make 4K a success or failure

IDG UK Sites

iPhone 6 vs iPhone 6 Plus: Which new iPhone 6 model should I buy?