Hazel 5 and the Next Hazel Field Guide

Hazel Icon 2020

With the release of Big Sur, Paul Kim released a brand new version of Hazel. Version 5 adds several new features. Just a few of them include:

  • Support for macOS Big Sur.

  • A standalone app form factor instead of a preference pane.

  • A pile of UI improvements making creating and organizing rules easier and better.

  • Way better match text tools

If you purchased Hazel 4 anytime during 2020, you can upgrade for free. Otherwise, the upgrade is $20. I paid immediately. I’ve received a lot of email about the Hazel Field Guide. With this new interface and toolset, I will be making a second edition Hazel Field Guide in early 2021. It will be a new purchase but have an upgrade price for prior customers. Stay tuned. 


Hazel is Catalina Ready and Discount on Hazel Field Guide

When Catalina first released, there were a few tricky problems for Hazel. Those are all resolved now and version 4.4 is out fully and updated for Catalina. I've been running it for a while and have no problems. I have heard from several listeners that were holding off on their Catalina update until Hazel was ready. Now it is. For version 4 owners, this is a free update. To celebrate, I am putting the Hazel Field Guide on sale for a week. Use code HAZELLOVESCATALINA to get five dollars off.

Hazel 4.1 Update

I’m a little late on this story but Hazel got a very nice update over the last few months. The new version 4.1 adds several useful features including:

  • Better date matching
  • The ability to make a match based on file attributes of another file in the same folder
  • There's also a new token for "any non-blank character"

These and other additions make this a nice improvement to an already useful Mac utility. I'm working on some new video content based on the updates. It will get added to the Hazel Video Field Guide when it's finished. I’m not making any promises on a release date just yet.

The Hazel Video Field Guide

I'm pleased to announce the release of my latest Video Field Guide. This one is all about Hazel. For years, Hazel has been one of the best kept secrets on the Mac. Using Hazel, anybody can automate large portions of their work. The thing I love about Hazel is the way it can turn mere mortals into automation gods. Anybody can do this. You don't need a lick of programming knowledge.

The Hazel Video Field Guide assumes that the viewer has no knowledge of Hazel and starts with the basics but by the end ramps up to advanced techniques including home automation via Hazel. One of the workflows, for instance, shows the viewer how to automatically lock their Mac when they leave their home or office using a combination of IFTTT, a simple AppleScript, and Hazel.

The Hazel Video Field Guide is a two-and-a-half hour video screencast with 35 separate chapter markers that teaches you everything you need to know about Hazel.  You can start the screencast without knowing a thing about it and by the end of the screencast you'll be using Hazel to automate everything from filing your bills to having your Mac play some of your favorite music as you arrive home. There is a lot you can do with Hazel and this screencast explains it all including:

1. MASTER OF DOCUMENTS

Hazel will manage your documents for you. Not only can Hazel help you name and file documents, it can also reach inside documents and look at their contents and then use that data in naming the file and putting it in the right place. Hazel is a document management beast and both more efficient and reliable than having a human manage electronic documents. Hazel is also an excellent copilot as you start tagging files. Some of the workflows in this Video Field guide explain how to automatically apply tags to categories of documents so you have the benefit of tagging without the work of creating them. 

2. TAMER OF FILES

Hazel can do a remarkable job of cleaning up after you on your Mac. Hazel can keep an eye on any folder on your Mac, including your downloads folder and your desktop, and keep things nice and tidy. Set your rules once and never have a messy computer again. 

3. MEDIA AUTOMATION

Sorting and filing your media is a pain in the neck. Hazel can take this burden on for you. Using Hazel, you can have your images automatically filed in the Photos application or you can have Hazel automatically sort and organize folders full of images by their date. You can even use a Hazel to automatically rename your images while you're organizing them. Hazel can also manager music for you. Hazel has the ability to automatically import new music into iTunes so you don't have to.

4. REMOTE CONTROL

Not many people realize what a powerful tool Hazel can be for automation. Hazel is always watching. It will jump into action with something as simple as a new text file being added to your hard drive. Moreover, once Hazel kicks in, it can do just about anything on your Mac. One section of this Video Field Guide demonstrates how you can use AppleScript and services like IFTTT to easily create automation scripts for your Mac. One of the sample Hazel workflows will automatically lock your Mac when you leave your house. Another will play your favorite music when you arrive home. Once you understand how these work, and I demonstrate every step, you can alter the scripts to make your Mac do just about anything you want at anytime you want.

5. Manage Your Trash and Smart App Deletion

Another common pain point for Mac owners is managing the trash. If you're not watching it, your Mac's trash can fill up your hard drive. Hazel takes care of this problem for you with the ability to automatically empty the trash after a set period of time or when the trash gets to a predefined size. The settings are easy and completely remove this problem from your life. Likewise, Hazel can also take care of deleting and restoring applications from your Mac. Hazel doesn't just delete the application but all those obscure resource files that are scattered over your drive.

INCREASE PRODUCTIVITY

Hazel does the tedious work so that you can do the important work. This lovingly crafted video is just shy of two-and-a-half hours. There are 35 chapter markers and the video covers every aspect of this super-powerful Mac application. Who doesn't want to wield super-powers over their technology?

Get the Hazel Video Field Guide today for $19.99.

Want a peek? Here's 30 minutes of the Hazel Video Field Guide.

Here is 30 minutes of the 2.5 hour Hazel Video Field Guide. For years, Hazel has been one of the best kept secrets on the Mac. Using Hazel, anybody can automate large portions of their work. The thing I love about Hazel is the way it can take any mere mortal and turn them into an automation God. Literally anybody can do this. You don't need a lick of programming knowledge. The Hazel Video Field Guide assumes that the viewer has no knowledge of Hazel and starts with the basics but by the end ramps up to advanced techniques including home automation via Hazel. One of the workflows, for instance, shows the viewer how to automatically lock their Mac when they leave their home or office using a combination of IFTTT, a simple AppleScript, and Hazel.

Hazel 4.0

Today sees the release of Hazel version 4.0. I’ve talked, written, and screencasted about Hazel at length over the years. It’s one of my very favorite Mac utilities. The new version has some great features like:

  • The ability to apply rules to smart folders
  • Rule syncing between Macs
  • Previewing your rules while editing them
  • The ability to toggle extensions

There’s more. Put simply, Hazel can materially improve your productivity. About a month ago I committed to creating a Hazel Video Field Guide. I’ve got a lot of time in this project already and it is looking great. I expect I’ll have a release within the next two weeks. Stay tuned.

Automating Invoice Processing on My Mac

When I first opened my solo law practice, one of the unanswered questions in my mind was how I would go about billing clients. This is supposed to be hard. Some law firms spends days every month on getting bills out the door. Others pay outside vendors. I decided to nerd the s%*t out of this problem and do it myself.

I use an online practice management solution, Clio, to track my time. At the end of the month, the service creates PDFs of my invoices that go into my Mac's Downloads folder. Rather than show an actual client invoice, I'll use this dummy invoice for my side landscaping business.

One of the tricks of this workflow is that when I push a button in Clio, the PDF is created and opens automatically on my Mac in the Preview application. The first tool to help me automate the process is Hazel. I've talked a lot about Hazel at this site and on the podcast over the years. One of Hazel's many talents, is the ability to identify, name, and move files. So I've got Hazel constantly looking at my Downloads folder. If it sees a PDF file that has the text "Lawn Care Products and Livestock", "PO number", and "Gunther's Gardening", it will start acting on that file. My logic is that there will be no PDFs in my Downloads folder that have all of those words in that order that are not an invoice. Here's the Hazel Rule.

Once Hazel finds a match, usually within seconds of the file downloading, Hazel renames the file with the current date, client name, and a further description of the invoice. Because the PDFs open on my desktop at the time of the download, it's fun to watch the name change as I'm reading the invoice over. Next Hazel moves the invoice to a folder I've designated in the client's Admin/Invoices folder.

So within seconds of downloading the invoice, my Mac has named and moved the invoice to its appropriate folder.

Next I click on the sharing button in the Preview App (which is diplaying the invoice). From there I click on the Mail icon and this creates a new blank email with the invoice already attached.

My next big tool is TextExpander. I manually type in the client's name as an email recipient. Then I tab down to the s ubject line and fire off a TextExander snippet. The snippet phrase is "newbill". The snippet first fills in the subject line with the terms "Sparks Law %B Invoice" which TextExpander fills in as "Sparks Law October Invoice". Next month the snippet will automatically change "October" to "November". (TextExpander recognizes the wildcard %B as the current month.)

Next, the snippet asks me to fill in the client name and let's me choose from several frequent options. Three common issues in these cover emails are questions about whether the client wants to pay online via credit card, wants a snail mail copy of the invoice, and if there is someone else at the company that needs to get the invoice. I use TextExpander Optional Selection phrases for this. I can check or uncheck the appropriate phrases for the particular invoice.

Finally,  I have a multi-line field at the bottom where I can write or dictate in a further description of services or plans for the coming month.

Here is the finalized email from the above snippet screen.

Here is a screenshot of the snippet form TextExpander.

Here is the full text of the snippet if you want to adapt it for use use it in your copy of TextExpander at home.

Sparks Law %B Invoice
%key:tab%Hi %filltext:name=field 1%,

Attached is this month’s invoice. %fillpart:name=online pay:default=yes%I also sent you a separate email with online payment instructions if you’d prefer to pay that way via credit card.%fillpartend% %fillpart:name=optional part 3:default=yes%Also, please let me know if you’d like hard copies of these invoices in the mail.%fillpartend% %fillpart:name=someone else:default=yes%Finally, if you’d like me to direct these to someone else at the company, let me know.%fillpartend%

%fillarea:name=Message:default=Thank you for your business.%

Kind regards,

David Sparks
Sparks Law
SparksEsq.com

So this detailed explanation probably sounds like a lot but in action, the whole process is wicked fast. It takes just moments for me to approve and download a PDF invoice, at which point my Mac names and files the invoice, and I send it off to the client with a customized email. I love being a nerd.

As an aside, I have had very few clients take me up on the offer to get snail mail invoices. Almost everyone wants things in just PDF form. I have brilliant clients.

Hazel 3.1 with Date Matching

I often receive inquiries concerning ways to automatically pull a date from the text of a PDF document and insert it into the file name. This has, to some degree, become a Arthurian quest to automate file naming and use accurate dates. Since I first released Paperless, I've had several readers send in suggestions that involved very complex AppleScripts, multiple Hazel rules, and other devices that never quite seem to work.

Today, Paul Kim released Hazel version 3.1. The new version includes an improved content matching feature to include dates. This seemingly benign feature is anything but. It allows you to search the contents of a document for date formatted text. You can even set the type of date format you're looking for. For instance 6/19/13 or June 19, 2013.

If Hazel finds a date, it will then retain that date and save it, in essence, as a variable. You can then apply that variable later to the file. In this case, I'm going to use the date in the file name. Hazel even corrects the date format, converting the slashes to dashes. It's like magic. This new feature got me so excited, I made a short video explaining how to do it. My thanks to Johnny Knittle for providing the music.

Put Your Mac to Sleep with iOS Drafts

Occasionally, I have sensitive things on my Mac's screen and occasionally I leave an office, or conference room, or courtroom and forget to shut the lid on that Mac. While I've got my Mac set to lock itself down after a few minutes, I thought it would be nice to have a way to force the issue. Mac Power User listener Mariusz wrote me about Polish Mac Geek Milosz Bolechowski who pulls this off with Drafts, a Dropbox File, and Hazel. I thought it was pretty clever so I duplicated it tonight.

This is how it works:

  1. I type "MB sleep" in Drafts and save it to the standard Drafts folder on Dropbox. (In my case it is located at Dropbox/Apps/Drafts.) I use "MB sleep" because I'm going to add a second one for putting the iMac to sleep.

  2. Point Hazel at the Drafts folder and tell it to look for a file that contains the terms "MB sleep"

  3. When Hazel sees the file, it deletes it and runs an AppleScript to put the Mac to sleep.

This is a really simple script.

tell application "Finder"

sleep

end tell

Once you set this up, open Drafts and type "MB sleep" and save it to Dropbox. Within a few seconds, your Mac goes safely to sleep.

Extra Credit

Milosz had another great idea of using a URL scheme to further automate this. If you want to take it a step further, set up a URL scheme in Launch Center Pro as follows:

drafts://x-callback-url/create?text=MB%20sleep

Then when you tap the button in Launch Center Pro, it opens Drafts and fills in the text "MB sleep" for you. You just need to send it to Dropbox for the Magic to happen. The below screenshot gallery gives you the details.

Update

Extra Extra Credit

On Twitter, @Eiscik points out the following Launch Center Pro action performs the Dropbox upload for you with no further taps.

drafts://x-callback-url/create?text=MB%20sleep&action=Save%20to%20Dropbox

Create OmniFocus Tasks with AppleScript

Sometimes efficiency becomes the enemy. Because I'm now a believer in automating document filing via Hazel and OCR, I sometimes get myself in trouble. A case in point is my life insurance bill. It arrives every quarter. I used to scan it and then name it in my Action folder with a TextExpander snippet, which resulted in it getting sent off to a nested folder somewhere. At the same time I'd record an OmniFocus quick entry to pay the bill. It was all second nature. These days, I use a Hazel rule that looks at the contents of this invoice and names it and files it without me having to trouble to rename the file manually. Put simply, once I scan it, I never see it again unless I go looking for it. The problem is I keep forgetting to create the OmniFocus entry to pay the bill. That's bad. (Especially if I get hit by a bus, which would only add one more problem to cascading badness.) We can't have that.

I decided to create an AppleScript that automatically creates an OmniFocus task when this Hazel rule triggers. After a lot of head scratching, trial and error, and even some help from friends at the Omni Group and Ben Waldie (my AppleScript Sensei), I've cobbled one together. Here is a screenshot and the AppleScript code.

​
-- Lovingly crafted by David Sparks, The Omni Group, and Ben Waldie -- macsparky.com

set theDate to current date
set theTask to "Pay Life Insurance"
set theNote to "Lovingly Scanned by your Mac on " & (theDate as string)

tell application "OmniFocus"
tell front document
set theContext to first flattened context where its name = "Tech"
set theProject to first flattened project where its name = "Finance"
tell theProject to make new task with properties {name:theTask, note:theNote, context:theContext}
end tell
end tell

To test the rule, open AppleScript Editor and copy it in. You need to change the context and project names to something that is in your OmniFocus library. Once you trigger it, AppleScript will create a new task in the designated project with the designated context. The task also gets named and the Note field will include the text "Scanned on {today's date}". This just happens. Don't believe me? Go look in your OmniFocus project afterward.

I use this script directly in Hazel. Specifically, when I've got a scan that requires future action, I add an AppleScript Hazel action at the end to run this script. After Hazel gets done naming and filing my document, it creates a handy OmniFocus task. Below is my life insurance Hazel rule screenshot to demonstrate.

​

I've modified several versions of the script to handle the variety of documents I scan and OCR that require an automatic OmniFocus action. Creating an OmniFocus task with a script is damn useful. You could use this in a lot of contexts outside of document filing. You're welcome.

Below is a download link for the Hazel rule. Go nuts.

Download Sample Hazel Rule

Hazel Update

 

One of my very favorite Mac utilities, Noodlesoft’s Hazel released an update this week with several interesting feature addtions. You can now add sequential numbers to your rules and reference a source folder allowing you to mirror folder structures when moving and copying files. The update is free to registered users and a new license for Hazel is $22. You can learn more about Hazel at my review here and one of my favorite Hazel workflows here.