// Apple Mail to Evernote Applescript

Have a Mac and want to move emails from Apple’s Mail application into Evernote quickly? Use this AppleScript!

Apple Mail to Evernote

UPDATE — June 9, 2010

I have just posted Version 1.3 of the script which marks a departure from previous releases in a couple of ways:

  1. The Script is now an App — Just double-click it to run, throw it into your Dock, or set it up to run with a keyboard shortcut… whatever floats your boat!
  2. I’ve eliminated the Source Code from this post to make everything fit onto one short page — and also because, of the thousands of people who have downloaded the script, only a handful have shown any interest in playing around with it. If you’re interested in helping me improve the script (or are geeky for AppleScripts), just use the contact form to get in touch and I’ll hook you up.

Features (Updated June 9, 2010)

  • This script exports a text copy of every selected email message in Mail into Evernote.
  • UPDATED: This script will now also attempt to add attachments as well (see below for the “fine print” on this)
  • When the script creates the note in Evernote, it uses the Subject line of the email as the title of the note, and it also uses the date the email was received as the “Creation Date” of the note.
  • The script also copies basic header information to the first line of the note (e.g., a working mailto: link for the message sender and also date/time information).
  • A direct link between the Note in Evernote and the Message in Mail is now functional! Just click on the little arrow next to the message link in the “Source URL” area to be taken directly to the original message!
    evernotescreensnapz001

  • I have added a tag dialog box which lets you tag items on the way into Evernote. If you have selected more than one email, the tag(s) you choose will be applied to all of the messages.
  • The script defaults to sending the messages to your Default Notebook. As in the earlier version of the script, you can also retrieve an alphabetized list of your current Evernote Notebooks and select which notebook to archive your messages into.
  • Want to make a new notebook? No problem — The script has a “Create New Notebook” button which will let you do that on the fly!
  • Automatic Growl detection has also been enabled which will save you a trip to the Script Editor to enable/disable it.

Current Limitations and Open Issues

(Otherwise known as “Places Where You Could Help Out!”)

  1. Text of emails only — not HTML (yet…)
  2. Evernote seems to have stalled in their AppleScript development so, unless I can figure out another way to do it, the attachments will have to be imported as separate notes. (Try it on a couple of notes first to get the feel of things.)

    You can manually merge the notes later if you’re so inclined – FYI.

  3. If you don’t already have an Evernote Premium account, this won’t magically allow you to save file types that aren’t a part of their free offering.

How to Install and Use

Just highlight the email messages you want to send from Apple Mail to Evernote and run the script!

  1. You can highlight the email messages you want to archive into Evernote and then double-click this script file;
  2. You can save this script to /Library/Scripts/Mail Scripts and launch it using the system-wide script menu from the Mac OS X menu bar (The script menu can be activated using the AppleScript Utility application). Keyboard shortcuts can also be assigned to AppleScripts in the script menu using the System Preferences “Keyboard & Mouse Settings”.
  3. If you’re importing a lot of items, I’d recommend that you change a few settings inside Evernote before beginning the import. In the “Clipping” tab of the Preferences menu, uncheck the boxes in the section called “After a clip:”
    disable windows
    If the boxes are checked while importing a large number of items, Evernote will fill your screen with open windows and sound like it is repeatedly shooting you with a laser from a 70′s Sci-Fi movie. Trust me — uncheck the boxes first and you’ll be much happier! ;)

FastScript link and support

Do yourself a favor and download and install FastScripts from Red Sweater. Triggering the script from the keyboard really supercharges the process — you’ll watch items practically fly into Evernote with a few keystrokes! Here’s how you set it up:

  • Copy script or an Alias to ~/Library/Scripts/Applications/Mail
  • Set up your keyboard shortcut in the FastScripts Preference menu

For my FastScripts workflow, I am using ⌘ E (as in Evernote) for my global “Send to Evernote Shortcut”. I use AppleScripts to move items from several programs into Evernote — FastScripts can detect which program I’m in and pick the appropriate script to create the note. All I have to remember is ⌘ E!

If you use the FastScript Lite version (or the native OS X shortcuts), you’ll probably need to set up distinct keyboard shortcuts for each of your “Send to Evernote” scripts.

CLICK HERE TO DOWNLOAD

Take One Minute to Keep This Site Going — Either With Your Comments or Contributions!


Found a bug in the script?

Click Here To Submit Your Bug Report!

Snow Leopard Users

Click Here to Check Out Some Great New Services!

Want a script customized for your workflow?

Contact me to find out how to commission a script!

Interested in what other scripts are available for Evernote?

Click here to see the latest list!

24 Responses to “Apple Mail to Evernote Applescript”

  1. pandaren says:

    Hi,

    First of all, this is a very nice script and it helps alot.
    May I suggest if you could prepare a version with lesser interaction with evernote?? I am using mailActOn and would like to use a short-cut key to copy the mail to evernote, but the tagging box and the notebook box is a bit meaningless to me and it interrupt my process. Any chance?

    Thank you very much.

    • Justin says:

      Glad you like it!

      There are a few options I am considering for the next revision — I’ll count your comment as one vote for “fewer boxes”.

      Anyone else have any suggestions for changes that would make the script more useful to them?

  2. Ken says:

    Hi,
    Probably a numpty question but I’ve never used scripts – there is no scripts folder in my library . . .
    Appreciate your help
    -ken

    • Justin says:

      Hi Ken,

      No problem — we’ll get you started straightaway!

      I was going to type up my own explanation of how to do it, but then I remembered that Smashing Magazine recently wrote a feature that was a good primer on AppleScript (and ways to use it). The first section (called, appropriately enough, “First, Where To Put Your AppleScripts”) should answer your question. I think it would also be worthwhile to skim through the rest of the article and see some of the ways people are using AppleScript….

      Come back and let me know if you have any trouble installing and running the script or, more optimistically, come back and let me know how it’s working for you!

      • Ken says:

        Hi Justin,

        Thanks a lot! That article was a great place to start. I have got the script there and working now, just need to figure out the k/b shortcut process but even without it is very simple. You have opened the door for me to something I did not even know existed & now i can see many more uses – I thank you for that.
        Life is an education!
        kind regards
        -ken

        • Justin says:

          I felt the same way when I discovered AppleScript — it was one of those “Eureka!” moments where I felt I could really see a distinct difference between the Mac and PC ways of doing things.

          Allow me to provide some additional encouragement: The next time you find yourself saying “I wish that [INSERT PROGRAM NAME] could do [INSERT FEATURE HERE]“, see if writing an AppleScript would solve your problem.

          Philosophically, I like the idea that we can take a more active role in shaping the tools we use. Instead of waiting around / complaining to developers about a program, we can customize it to our particular needs!

          It’s really not that hard to get started! The very first script that I ever wrote was to help a client streamline her workflow, and it worked so well that it piqued my interest to learn more.

          In any event, let me know if you need help with the keyboard shortcut — my guess is that, once you get it working, you’ll start loading up Evernote pretty quickly! ;)

          • Francisco says:

            Hi. This script helped me a lot! It’s very useful, but I’d change something.

            First off, note that I’m completeley newbie about this scripts stuff, so let me know if I can do, by myself, what I need.

            Delete the notebook selection panel. Anyway of send an email directly to the default notebook in Evernote?

            Thanks in advance!

  3. Justin says:

    Francisco,

    Try the new 1.2 release of the script and tell me what you think!

  4. Carlos Zatara says:

    Found a bug…
    The script does not currently work with RSS, the bug seems to be on the variable myTitle. I will have a look at it later to see if I can fix it.

    Great work by the way!

    • Justin says:

      Carlos,

      That would be fantastic!

      Part of why I began posting these scripts publicly was in the hopes that other people would “roll up their sleeves” and help me make them better.

      If you’re able to figure it out, just let me know your changes and I’ll update the code. This comment section lets you post code inside; just use the “code” “/code” tags (inside the <> naturally) around the block of code:

      It will look like this if you do it correctly.

      Keep us all posted on your progress!

      Kind Regards,

      Justin

  5. Mark Fowler says:

    Hi, I’m having problems downloading this script with your tracker.

    bash$ wget http://veritrope.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://media.veritrope.com/scripts/Apple-Mail-to-Evernote-1.2.zip&remote
    bash$ cat tracker.php\?url\=http\:%2F%2Fmedia.veritrope.com%2Fscripts%2FApple-Mail-to-Evernote-1.2.zip
    // You cannot download this file

    Direct downloads seem to work.

    HTH.

    Mark.

    • Justin says:

      Hi Mark,

      Thanks for the report!

      I’m certainly no BASH expert, but perhaps WGET is choking on all the dashes in the filename. For the next revision, I’ll try using underscores and see if that is more broadly compatible.

      In the interim, anyone with the need to download from the command line is welcome to do as Mark did and go to the direct link. Feel free to also provide me some “manual download tracking” on this comment thread (e.g., “Hey – I just downloaded your script!”)

      Hope you enjoy it and, as always, let me know if you have any other thoughts and suggestions.

  6. Chadwick says:

    In Snow Leopard, can this script be turned into a Service using Automator? I’ve tried dumping the script into the “Run AppleScript” box in Automator, but I keep getting an error when I try to run the Service in Mail.

    Any thoughts?

  7. george says:

    did everything just like it says, get the dialog, but nothing ever gets into evernote

    • Justin says:

      Hi George,

      Let’s try a few things to locate the issue here:

      1.) When you have received the dialog box, have you tried to “Select Notebook from List”? Did an additional dialog box with a list of your notebooks appear when you pressed it?

      2.) Assuming that you are able to select a notebook, try a different one than you normally have selected. Do your notes arrive now?

      3.) Which version of Evernote are you using? Which version of OS X?

      • george says:

        I does work if you select a notebook, but it does not work if you leave with the default one

        • Justin says:

          Okay — now we’re zeroing in on it! :D

          1.) What happens when you select your default notebook from the Notebook list? Does the note arrive? If so, you should verify the status of your default notebook in Evernote (e.g., that Evernote shows that it is the default notebook);

          2.) Which version of Evernote/OS X?

  8. Harris says:

    Excellent script! I second the motion of integration with Mail Tags/Mail Act-on by Indev. Currently, I just print as pdf to evernote from apple Mail, and then have to add the tags in evernote. If the mail tags could be picked up in the transfer from mail to evernote, using mail act-on keystrokes that would be amazing! Keep up the great work!

  9. Pandaren says:

    Again I am very glad with this script. One little suggestion – instead of copy the HTML to evernote, would you consider to copy the mail in PDF format to evernote? Would that be easier for scripting?

    Thanx

    • Justin says:

      I would check back here in the next few weeks: Some new scripts are coming… and I think yours may be one of them!

      So — PDF Archive , Mail Tags support….

      Who else has suggestions for the next round of improvements?

rss Subscribe to Comments RSS Feed

Tweetbacks

  1. Twitter Comment


    Very useful script: Apple Mail to Evernote Applescript | Veritrope [link to post]

    Posted using Chat Catcher


Trackbacks/Pingbacks

  1. Links to Evernote Applescripts and Accessories-- Updated Regularly! | Veritrope
  2. Surf-Bit’s Mac ReviewCast » Blog Archive » The MacReviewCast #231: PS Elements 8, Fusion 3, MainMenu, iCasual
  3. Apple Mail to Evernote AppleScript Update — Now With Attachments! | Veritrope

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>