22
Apr
Apple Mail to Evernote Applescript
Tags: Apple, Apple Mail, Applescript, Evernote, tutorial
Have a Mac and want to move emails from Apple’s Mail application into Evernote quickly? Use this AppleScript!

Features (Updated July 25, 2009)
- This script exports a text copy of every selected email message in Mail into Evernote.
- 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).
- 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.
- UPDATED: The script now 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!”)
- Text of emails only — not HTML
- Email Attachments won’t save with the new note.
- UPDATED — Thanks to the Evernote Development Team, the direct linking 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!
Creating a direct link to the original message in Mail doesn’t currently work, but I am leaving some code in a comment inside the script that should work if Evernote updates its HTML parser to detect the “message://” URL in the body of a note (see this post on Daring Fireball for more detail on how this works).

I’d also like to save the either a link to the original email or to the sender’s email address in the “Source URL” section of the note, but Evernote currently only allows http: and https: values to be written there.- Errors that will undoubtedly arise when you do something that I didn’t think of or test for!
How to Install and Use
Just highlight the email messages you want to send from Apple Mail to Evernote and run the script!
- You can highlight the email messages you want to archive into Evernote and then double-click this script file;
- 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”.
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 for Source Code and Download Link!
Apple Mail to Evernote ApplescriptPages: 1 2


21 Responses to “Apple Mail to Evernote Applescript”
Great!
Glad you liked it!
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.
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?
Hi,
Probably a numpty question but I’ve never used scripts – there is no scripts folder in my library . . .
Appreciate your help
-ken
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!
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
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!
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!
Francisco,
Try the new 1.2 release of the script and tell me what you think!
Great! Just I wish.
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!
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:
Keep us all posted on your progress!
Kind Regards,
Justin
Hi, I’m having problems downloading this script with your tracker.
2
3
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.
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.
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?
I can send you something to beta test if you’re interested!
Either send me a message on Twitter (@Veritrope) or email me your deets and we’ll coordinate.
did everything just like it says, get the dialog, but nothing ever gets into evernote
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?
I does work if you select a notebook, but it does not work if you leave with the default one
Okay — now we’re zeroing in on it!
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?
Tweetbacks
Twitter Comment
Very useful script: Apple Mail to Evernote Applescript | Veritrope [link to post]
– Posted using Chat Catcher
Trackbacks/Pingbacks