Mailbag: Automatically Saving PDFs from Mail.app to Evernote

Mailbag: Automatically Saving PDFs from Mail.app to Evernote

mailbag

I received an email from a nice chap who recently purchased Evernote Essentials asking this question (presumably prompted by the example in the book of forwarding email receipts to Evernote automatically):

…is there a way to set a rule in Apple Mail that will automatically take any receipt email I get, say from iTunes or Amazon, and save them as a PDF in my Evernote account?

The short answer is no, but it only took me about five minutes to come up with a way to do this using Keyboard Maestro (one of my favorite utilities for OS X). Here’s a screenshot of the recipe, followed by an explanation:

Keyboard Maestro Editor

When you install Evernote for OS X, it inserts a nice little menu option within the standard Print dialog’s PDF menu:

OtherViews

Clicking this menu option will render whatever the current thing is as a PDF and shove it into Evernote. This Keyboard Maestro recipe automates the following steps that make up this process:

  • Click “File” then “Print” in the current application menu
  • Click the “PDF” button at the bottom left of the Print dialog
  • Type “Save PDF to Evernote” to select the appropriate option (this is the only way I could do this with some certainty that it would work, though there were other options)
  • Type Return

When you run this macro (which I do using ⌥⇧⌘P), you’ll actually see the various windows opening and options being clicked — not much I can do about that, I’m afraid. The good news is that they’re gone about as quickly as they arrive, so it’s not too big a deal.

Before you comment:

  • Yes, I realize that I could probably do this whole thing using some AppleScript hackery, but I have two kids and a limited amount of free time (see my post on paying for software).
  • I further realize that Keyboard Maestro isn’t free, but if you ask me, the innumerable amount of solutions one can automate using it more than justify the price tag.

It’s no secret that I’m a huge, annoying proponent of automating repetitive tasks whenever possible, so a big wet nerdy kiss to Erwin for giving me quality example fodder!

Photo by LoriHorwedel

Like this Post? Tell Your Pals!
Get More Great Tips

Comments

  1. Thanks again!

  2. So how would you do it in a windows world?

    • I really have no idea — the reason why this works so simply is that OS X has very deep OS-level support for the creating, rendering and viewing of PDF files. Windows has no such support and, honestly, I’m not aware of any automation tools like Keyboard Maestro for Windows (though they may exist, obviously).

  3. Brett, this looks like an awesome tool. I am not a programmer, is there somewhere I can go to learn about commands and formatting?

    Thanks

  4. This is an interesting solution, but I’m not sure it saves many keystrokes over just forwarding individual emails to Evernote by email. It should be pretty simple just to set up an autoforward rule that would automatically send anything with the word “receipt” in the subject and/or the standard subject line in Amazon’s receipt emails (“Your Amazon Order…”) directly to your Evernote email address. I realize that doesn’t save the receipts as a PDF, which was the original question, but it does get the receipt stored without having to think about it.

  5. You can do something similar without Keyboard Maestro or AppleScript:

    - Go to System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts

    - Click the ‘+’ button

    - In “Application”, select “All Applications”

    - In “Menu Title”, type exactly “Save PDF to Evernote” (without the quotes)

    - In “Keyboard Shortcut”, press Cmd+E

    Now you can save almost anything as a PDF in Evernote just by pressing Cmd+P followed by Cmd+E.

  6. Tried to get Print to evernote to work, but keyboard maestro doesn’t seem to like the press PDF button command. any tips