Creating an Instapaper script for Automator on OS X

A photo of my Harley and I taken by my friend Katie.
A few months ago I did a write up on Quora explaining how to create an Instapaper script for Automator on OS X that allows you to save any URL in your clipboard to Instapaper.

Since I use Airmail as my mail client and because I subscribe to a lot of newsletters, each morning I work my way through all the newsletters in my inbox and save the links to Instapaper so I can read them during my commute on the train.

If you're reading your email in a browser client like Gmail, you can already easily save articles using the Instapaper Chrome Extension. Below, I'll explain how to save articles locally on your Mac without having to first open them in a browser.


In order to create your own Instapaper Automator service:

  • Open Apple’s Automator application and create a new Service
  • Drag the "Run Shell Script" action into the application’s main workflow area
  • Make sure the service receives no input, can be used by any application, and that the shell script is set to run python
  • Copy and paste the above code snippet into the shell script while also making sure to include your own Instapaper username and password
  • Save your new service as "Save to Instapaper"
  • Open System Preferences, then navigate to Keyboard, followed by Shortcuts
  • Click on the Services tab, scroll down to the General category, and then set a keyboard shortcut for your newly created service

In order to use this service to save an article, first copy a link from your local email client and then use the keyboard shortcut you set above to save the article. The keyboard shortcut I use is: Command + Shift + Z.

When creating your script, you can also optionally drag out a "Display Notification" action beneath your shell script in Automator which will display a notification every time the script is executed and saves an article.

I hope that's helpful! If you run into any issues setting this up, hit me at @doog on Twitter and I'd be more than happy to help you troubleshoot.
A photo of my Harley and I taken by my friend Katie.