HazelSometimes I want to convert a few ebooks from epub to mobi for reading on my kindle. I could add them, convert them, and email them to Amazon using Calibre, but wouldn’t it be cooler to just drop the epubs in a directory and not think about them anymore until you open your kindle to read. This can be done with a workflow I found on jake.ch (r.i.p.) 7 years ago and it still works today. Using the command line tools embedded in Calbre, a “fire & forget” solution can be created for ebook conversion. The tool can be found here: /Applications/Calibre.app/Contents/MacOS/ebook-convert and to use it with Hazel, follow these steps.

1. Create three directories, ebook, converted, and sent.

2. In Hazel, create the following rule for the directory ebook.

If all of the following conditions are met:

Extension is: epub

Do the following to the matched file:

Run Shell Script:


FULL_PATH="$1"
ORIG_FILE=$(basename "$FULL_PATH")
/Applications/Calibre.app/Contents/MacOS/ebook-convert "$ORIG_FILE" "converted/$(basename "$FULL_PATH" .epub).mobi

Move to folder: converted

3. Now for the directory, converted, add this rule in Hazel.

If all of the following conditions are met:

Extension is: mobi

Do the following to the matched file:

Run AppleScript:


tell application "Mail"
	set newMessage to make new outgoing message with properties {subject:"Hazel to Kindle", content:""}
	tell newMessage
		set sender to "[your email address]"
		make new to recipient at end of to recipients with properties {address:"[your kindle email address]"}
		make new attachment with properties {file name:theFile} at after the last paragraph
	end tell
	delay 30
	send newMessage
end tell

Move to folder: Sent

4. Now just drop your epubs into the directory conver and watch the magic happen.