Use Mac OS X Services to Import Files into Evernote
During my recent foray into rediscovering Evernote, I experimented with Evernote’s Applescript dictionary and Snow Leopard’s updated Services architecture. My goal was to write a service that made capturing data into Evernote even easier.
I was pretty excited to see how easy it was to write a service and created one that directly import files from the Finder into Evernote.
Here’s how to set it up:
1) Launch Automator and select “Service”
The Service template in Automator is new to Snow Leopard and lets you create services from scratch.

2) Change “Service receives selected” to “files and folders”. Leave “any application” selected and “replaces selected text” unchecked.
The new Services template can handle a number of data types, but for us files or folders is what we want.

3) Pick the “Run Applescript” action from the Utilities Library and copy and paste the below applescript into the input box.
This script has error handling built in (that’s the try… end try statement), so if you pass something that Evernote can’t handle, you will get an alert box telling you what is wrong. The most common error you may see is if you try to pass the service an unsupported file type. For example, if you are not an Evernote Premium user and try to pass it a Word doc you will get an error, or if you try to pass it a folder, you will get an error.
The script supports passing multiple files (and if one of the files creates an error condition it will only fail that import, not the entire batch).
on run {input}
tell application "Evernote"
repeat with x in input
try
create note from file x
on error error_message number error_number
display alert "Send to Evernote Failed" message "Error: " & error_message & "
" & "Error Number: " & error_number as warning
end try
end repeat
end tell
end run
When you are done in Automator, it will look like this:
That’s it!
4) Go to File > Save As and name the service “File | Import to Evernote”
This saves the service so it is available throughout OS X.
5) Set a Keyboard Shorcut via Automator > Services > Services Preferences
This is not required, but if you want to create a keyboard shortcut, just find the “File | Import to Evernote” Service and double-click the keyboard shortcut column. I assigned shift-command-E, but you can do whatever makes sense for you.
6) Try it out!
Now when you are in the Finder, you can click your keyboard shortcut and/or right click and pick the service from the context-menu and import files direct into Evernote.
Last Tip: If you have Growl installed and have it configured for Evernote, you will get a Growl notification once the import is successful. It puts a nice finishing touch to the service.
-
Andrew McGeachie
-
http://veritrope.com Justin
-
Ken Clark
-
Ken Clark
-
http://macpowerusers.com/?p=155 Mac Power Users» Blog Archive » MPU 011: Services and Macworld 2010
-
http://veritrope.com/tips/evernote-applescript-resources-and-accessories Links to Evernote Applescripts and Accessories– Updated Regularly! | Veritrope
-
Martyn
-
Adrian
-
Stan Scott
-
Ken Clark
-
Ken Clark
-
http://www.heynanynany.com trav
-
andrew
-
awarre
-
Ken Clark
-
http://www.altimax-search.com Scott
-
Ken Clark
-
Kirk Walchek
-
teophag
-
Alan
-
http://twitter.com/Ragart Thomas Wong
-
big opera
-
http://kenclark.me Ken Clark
-
http://kenclark.me Ken Clark
-
http://www.facebook.com/scottdforeman Scott Foreman
-
http://kenclark.me Ken Clark
-
http://www.thadthoughts.com/?p=31 Scanning and Evernote: Mashup of the Week – Thad Thoughts
-
http://www.facebook.com/ddejonghe Dominique Dejonghe
-
http://kenclark.me Ken Clark
-
http://andrewdubber.net Dubber
-
Dubber
-
http://kenclark.me Ken Clark
-
http://twitter.com/cerithom Ceri Thomas
-
Paul
-
Jbucchieri
-
Jbucchieri
-
http://kenclark.me Ken Clark
-
http://kenclark.me Ken Clark
-
Jlouis54
Previous post: The Device Driver Got Stuck In An Infinite Loop



