THIS WEEK'S SPONSOR:

Backblaze

Astonishingly Easy And Unlimited Cloud Backup


Extending Evernote: AppleScripts for Chrome, Safari, Instapaper and Alfred

Evernote is a cross-platform note taking solution that is adored by many for its ability to not just store snippets of information but also serve as an external brain. Among the many reasons users are drawn to this product is its extensibility. You may not realize this but Evernote has a very in-depth AppleScript dictionary that you can use to extend the feature set and make it do some pretty neat things you can’t do with it out of the box. I am going to show you how simple AppleScripting can add a few cool features to your Evernote workflow.

Note: These scripts work best when called with a global keyboard shortcut using an app like Keyboard Maestro, FastScripts, or Alfred.

This first AppleScript is used for storing a URL to whatever webpage you are currently viewing and it works with Safari, Chrome, and Chrome Canary. By default Evernote stores the entire webpage including images, navigational menus, and even advertising links. Having a snapshot of a page is great for some situations, but most of the time you just want to grab a link to the site and safely store it in Evernote so it can be easily retrieved. This script will check to see which browsers are running and it will grab the frontmost tab from the browser that is currently active; it’ll then neatly format the information into a note with the proper title and source url, and automatically sync Evernote.

Here is an example of a page I enjoyed and wanted to be able to find again at a later time. Everything is neatly formatted with no extra fluff.

URL to Evernote

URL to Evernote

Here is an example macro to launch it from Keyboard Maestro:

Download the script: Webpage Link to Evernote AppleScript

Send Webpage Text to Evernote

This script adds the ability to store just the text and relevant images from a webpage to Evernote. Like the first AppleScript, this one checks for Safari, Chrome, or Chrome Canary and grabs whatever tab you have currently active from one of those browsers. The difference is this script will also pass the website through Instapaper’s free mobilizer service. The original intent of the Instapaper mobilizer is to make text easier to read on mobile devices, but it also works well in this situation to strip off unwanted website elements so you can store just the text.

Here is an example of a website stripped down to just the text and stored in Evernote for offline reading:

Text to Evernote

Text to Evernote

Here is an example macro to launch it from Keyboard Maestro:

Download the script: Webpage Text to Evernote

 

Send a file to Evernote with Alfred

The final AppleScript comes in the form of an Alfred Extension. To use this script you will need to have purchased the Alfred PowerPack. It allows you take a file on your computer and send it directly to Evernote using only Alfred. This is extremely convenient when you are not working in the directory of the file you need to add, so you can simply pull up Alfred, quickly find the file wherever it may be stored and add it to Evernote.

Here are the settings and code to get this to work. You’ll see that this one actually takes very little code since Alfred is doing most of the work.

Alfred Settings

Alfred Settings

 

Simply search for a file with Alfred and choose the “Add to Evernote” from the Action Menu:

Alfred Usage

Alfred Usage

 

If the file is currently selected in Finder, you can also use Alfred’s Finder Selection keyboard shortcut to quickly get to the Action Menu for that file:

Here is the note that is created with the file now stored in Evernote’s database:

Alfred Final

Alfred Final

I hope these scripts can find a place in your workflow and I encourage you to poke around in the code. It might just inspire you to open up the AppleScript Editor and make some tweaks of your own!

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.