Automatically create an Evernote note for every file in a directory

Sometimes can be usefull to have a directory (on your desktop, on your Finder favorites sidebar, etc.) with some kind of automatism applied.

For example, I’ve a directory with an automatism for moving all files I put in that to another directory.

Crazy?

Try to follow my idea…

When I’ve started using Evernote, my dream was to make my home a paperless home (with an exclusion for my daughter drawings). It’s a great idea, but unfortunatly I live in Italy, where the paper is necessary.

For example, in Italy, you can receive an invoce by e-mail. Great… but….

As long as you have not printed, it is not legally valid, and for the law is like a spam email.

So, I can’t living paperless, but I love to have all my piece of paper, from the invoce to my clients weekly signed reports, searchable and stored into Evernote.

As I always say, Evernote becomes really useful when you start to use for everything.

Before you run to buy one of the great Doxie scanners you can make some automatism on your workflow to make your scanning habits more Evernote friendly.

I usually don’t scan with my MacBook attached to the printer. I’ve an SD card, an SD card slot on my printer and another SD card slot on my Mac so my old workflow is this:

  1. Put the SD card in the printer
  2. Scan the paper
  3. Remove the SD card from the printer and put in the MacBook SD card reader
  4. Drag the files on the Evernote icon, one-by-one, to create the notes
  5. Remove the files from the SD.
  6. Eject and remove the SD card from the Mac

But I can do something more to make this process less human-dependant… I love all kind of automatism :D

So, first of all I’ve made a Folder Automation (with the Automator app on the Mac) attached to my SD volume (be sure to naming the SD card with a unique name, my personal is ‘ScannerSD’). This Folder Automation get all files on the SD volume and put those in a folder on my system, ~/Documents/Scanner; after that eject the SD volume.

I don’t explay how to create this automation… it’s really simple and you can do some practice using Automator with this ;)

The second Folder Automation is binded with the ~/Documents/Scanner directory. This make the magic…

  • Launch ‘Automator’ and choose a new ‘Folder Action’
  • Select your directory in the list near ‘Folder Action receive files and folders added to’
  • Add the ‘Run AppleScript’ action to your workflow. You receive as input the list of the files in the selected folder
  • Put this code
on run {input, parameters}
  repeat with i in input
    tell application "Evernote"
      create note with text "" attachments i
    end tell
  end repeat
 
  return input
end run
  • This will create the notes with the attachments and return the same file list as before
  • Add the ‘Move Finder Items to Trash’ action to your workflow. This ensure to haven’t duplicates notes in your Evernote

Now, every time you put a file in the Scanner folder, this automatically become an Evernote note, and go directly in your trash.

Ok, save and you’ve done. Now my scanner workflow is this:

  1. Put the SD card in the printer
  2. Scan the paper
  3. Remove the SD card from the printer and put in the MacBook SD card reader
  4. When the SD volume icon disappear from my desktop, i can remove the card from the MacBook

Great! I don’t do anything, except to manage the physical device, the SD card.

But, how it works under the box??? Here the list:

  1. Near the SD volume become available on the Mac, the first ‘Folder Action’ was triggered.
  2. All files on the SD is moved (moved, not copied) on the ~/Documents/Scanner folder
  3. When the Scanner folder automation is triggered, all my scanned documents become an Evernote note with attachment

Probably there is a way to semplify this procedure using a Wifi-enabled SD card, but I don’t know if I can map that as a Network Drive so I’m not sure if it’s possible.

Written on April 29, 2013 - #Evernote #Mac