Jump to content
  • 0

Apple Script for (Batch) Auto Export to Evernote?


Shanna

Idea

Hi, 

 

I am totally, brand new to AppleScript. I have a bunch of school files that I need to upload to Evernote so I can search and find them easier.
I have been googling ways to create a 'watched' folder to automatically detect and upload to Evernote. I have tried a couple AppleScript services that I found on some old blog posts but I haven't been able to get any of them to work. 

I am hoping that someone can share one that is definitely working, along with instructions on how to attach it to the Folder Actions Setup.

 

I'm using Mac OS X Mavericks 10.9.2

 

I would appreciate any help!

S.

 

Link to comment

12 replies to this idea

Recommended Posts

Hi, 

 

I am totally, brand new to AppleScript. I have a bunch of school files that I need to upload to Evernote so I can search and find them easier.

I have been googling ways to create a 'watched' folder to automatically detect and upload to Evernote. I have tried a couple AppleScript services that I found on some old blog posts but I haven't been able to get any of them to work. 

I am hoping that someone can share one that is definitely working, along with instructions on how to attach it to the Folder Actions Setup.

 

I'm using Mac OS X Mavericks 10.9.2

 

I would appreciate any help!

S.

 

I found this and saved the article to evernote. It still works for me and I have changed MacBook Pro three times. Hope this helps.

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.

 

Link to comment

Thank you for such a quick reply! I need some more assistance please:
 

(1) I tried this but I am getting a syntax error: "Expected end of line but found unknown token."

 

(2) Question: Is this script going to allow send to Evernote for one file at a time, or batch upload?
I have a lot of PDF articles and I would like to put them into a particular folder that can detect whenever I add files and upload to Evernote (creating separate ENs)

Link to comment
  • Level 5*

Hi, 

 

I am totally, brand new to AppleScript. I have a bunch of school files that I need to upload to Evernote so I can search and find them easier.

I have been googling ways to create a 'watched' folder to automatically detect and upload to Evernote. I have tried a couple AppleScript services that I found on some old blog posts but I haven't been able to get any of them to work. 

I am hoping that someone can share one that is definitely working, along with instructions on how to attach it to the Folder Actions Setup.

 

I'm using Mac OS X Mavericks 10.9.2

 

I would appreciate any help!

S.

 

Shanna, I recommend this AppleScript developed and maintained by  Veritrope.com:

 

I have been using this for years, and it works great.

It is also easy to customize.  For example, I changed it to set the Note Created date to the File Created Date.

Link to comment

Thank you for that link.  

I entered some of the script and did not get any error messages but I am still not having any success.

 

I'm running OS X Mavericks. I noticed that my Library/Script folder is totally empty.
The services I create are being saved as .workflow files in the Library/Services folder (I was able to successfully execute a simple Send to Evernote script for the contextual 'right click' menu, and I notice that this file is also saved as a .workflow file in Library/Services folder).

I copied this Import Folder script to the Library/Workflow/Applications/Folder Actions folder and it then shows up in my Folder Actions Setup script options, but still as a .workflow file (amidst the .scpt files already provided). I'm wondering if this may have something to do with why the script does not execute...How can I get it to save as .scpt file? Are things different in OS X Mavericks?

I appreciate all the help guys. I am at the bottom rung of the 'newbie-ism' ladder where Apple Script is concerned!

Link to comment
  • Level 5*

Shanna, I haven't upgraded to Mavericks yet, so I'm not much help here.

You might post a comment on the Veritrope.com page explaining your issue.  The site owner usually responds within a few days.

 

Also, you might review the Veritrope installation instructions to make sure you followed them correctly.  You may need to open the script in the Applescript editor and compile it.

Link to comment

Hi all,

I've been migrating all my Dropbox documents to Evernote since I last posted here and found an alternative using IFTTT.

Try this IFTTT Recipe: Place something in Dropbox it goes to Evernote https://ifttt.com/recipes/31435

Since you are looking for a bulk upload maybe this might help. I haven't tried it myself as if yet but looks good. I'll give it a go tonight and see if it does the job.

Link to comment
  • Level 5*

Hi all,

I've been migrating all my Dropbox documents to Evernote since I last posted here and found an alternative using IFTTT.

Try this IFTTT Recipe: Place something in Dropbox it goes to Evernote https://ifttt.com/recipes/31435

Since you are looking for a bulk upload maybe this might help. I haven't tried it myself as if yet but looks good. I'll give it a go tonight and see if it does the job.

 

Kieran, thanks for the suggestion.  I'm sure some people will find it useful.

 

My concern with it is that it results in the same file in two places:  Evernote and DropBox.

 

The Evernote Import AppleScript deletes the file on your Mac AFTER it imports into Evernote.

Link to comment

Hi all,

I've been migrating all my Dropbox documents to Evernote since I last posted here and found an alternative using IFTTT.

Try this IFTTT Recipe: Place something in Dropbox it goes to Evernote https://ifttt.com/recipes/31435

Since you are looking for a bulk upload maybe this might help. I haven't tried it myself as if yet but looks good. I'll give it a go tonight and see if it does the job.

 

Thanks Kieran. I tried it and it would definitely work well for some people, namely those who want to keep the files stores in Dropbox.  This IFTTT recipe only generates and sends a Dropbox link to the Evernote note. It means that the files would need to be permanently stored in Dropbox as well.

I need my PDF files, articles etc to be imported directly into Evernote so that they can become searchable. 

Link to comment

Shanna, I haven't upgraded to Mavericks yet, so I'm not much help here.

You might post a comment on the Veritrope.com page explaining your issue.  The site owner usually responds within a few days.

 

Also, you might review the Veritrope installation instructions to make sure you followed them correctly.  You may need to open the script in the Applescript editor and compile it.

 

Thanks JMichael. I am going to take your advice and contact Veritrope. Will post any solutions that solve this problem back to this forum since it may come in handy for someone else.

Link to comment

Any of you Apple Script gurus have a script where you can take a word doc, copy the text, and past it into a new evernote note? I'm trying to take a bunch of recipes and put them into a recipe notebook. Thanks, Michael

Link to comment
  • Level 5*

Any of you Apple Script gurus have a script where you can take a word doc, copy the text, and past it into a new evernote note? I'm trying to take a bunch of recipes and put them into a recipe notebook. Thanks, Michael

 

JMW, I don't know of a script specifically designed for this task, but I think it is very doable.

 

You can probably put together a script using code from these resources:

  • Veritrope.com
  • macscripter.net
  • a Google of "Microsoft Word Applescript"

Good luck and let us know how it goes.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...