Posting to Posterous from a Mac without sending an email using an Automator workflow

I've mentioned before that Posterous was my favourite on-the-side blogging tool. I use it for one thing only at present: displaying images and videos I link to in my tweets. I find Posterous a much more elegant and flexible way of doing this than other image hosting services associated with Twitter, such as Twitpic or yFrog. But there's nothing wrong with using Posterous for a lot more than this. In fact, if I didn't need the features only WordPress can bring, I'd definitely be using it as my only blog. As it is, I post images and videos to my own blog on Posterous, which then get distributed to Twitter and Facebook (without duplication, which is nice); the videos additionally get sent to my Vimeo account.

Posting by email is horribly fastidious

One thing I definitely don't like about Posterous, however, is their idea that somehow, it's more convenient blogging by email. Far too fastidious: you need to fire up your email client or webapp, type in the email address, subject, message text, include the attachment… I can imagine some situations where it might make sense to blog by email, such as if I were urgently compelled to post about something from some Internet café in the middle of nowhere, with neither iPhone, nor iPad, nor MacBook Air at hand. Altogether an unlikely scenario.

Quite often, though, I want to share an image, screenshot or video, and find the post.ly method provided by Posterous for 'posting all kinds of files from your computer to Twitter' (and anywhere else that you set Posterous to post) just doesn't work in Safari with Flash disabled. On the iPhone (though, strangely, not the iPad), you can use Posterous's excellent app. On the Mac, however, you're reduced to sending an email to post@posterous.com with the media you want to share attached, a cumbersome procedure. Posting using the web interface, called Post Editor 2.0, although it's nice that that option is available, takes longer still.

MarsEdit unfortunately doesn't yet support Posterous

I'm a believer in using desktop clients whenever they're available; if they're not, I've found it can save time setting up a custom workflow or routine to match one's individual requirement. My favourite destop blogging client, MarsEdit, doesn't work with Posterous, because they don't use a standard API. As Daniel Jalkut, Marsedit's developer, put in in a forum discussion:

I am hoping that Posterous will implement support for one of the standard blogging APIs that MarsEdit supports. They have indicated that this is something they want to do, but I don't know what their schedule is for doing it.

If they don't do it soon, I may look into implementing support via their custom API, but since that is a considerable amount of work, I'm hoping they will adopt one of the standard APIs.

Posting to Posterous by just dragging the content of your post to a folder is childishly simple to set up using an Automator workflow

Until the feature becomes available on MarsEdit, for posting media files to Posterous without using email or the web interface, I've set up a simple folder action using Automator:

  • I created an empty folder on my Desktop (though you could locate it anywhere else) and called it Posterous;
  • I created an Automator workflow triggered every time content is added to the Posterous folder;
  • the Folder Workflow does the following in sequence: (i) gets the folder contents; (ii) creates a new Mail message addressed from my default email address to post@posterous.com; (iii) prompts the user to fill in the subject and content of the Mail message (which will appear as the post title and text); (iv) adds any attachments to the Mail message; (v) sends it and (vi) moves the attachment to the Trash.

Now, when I want to share a media file on Twitter, I simply save or drag it to the Posterous file, whichever is quicker, fill in the title and the optional text when prompted, and the media file gets posted to Twitter, Facebook and, if appropriate, Vimeo.

This is a short screencast of what it looks like. In this example, I'm reading my feeds in Google Reader, and come across a post with a screenshot of a preview of the forthcoming Mac version of my favourite RSS client, Reeder. To share it on Twitter and Facebook, via Posterous, all I need to do is right-click on the image and save it to the Posterous folder on my Desktop that's associated with the Automator workflow I've written. I could just as easily drag a file that's already somewhere in my file system to that folder: both would trigger the Automator workflow and prompt me for a subject to the email sent to Posterous, which will serve as the title of my post and as the text of the associated tweet.

In this example, we've found an image in a post we're reading on Google Reader (but it could be anywhere) and want to share it on Twitter and/or Facebook (or any of the other services that Posterous can post to). Instead of sending an email to Posterous, which is what one is supposed to do on a Mac, we'll use the Automator workflow associated with a folder lying on the Desktop. This will be triggered by—and applied to—any content dragged or saved to the folder. Since the image we want is still on the web, the quickest way to post it in this instance is to right-click on it in Safari, and save it to the Posterous folder. We'll then be prompted for a title for the email generated by the workflow, and everything else will occur in the background. Posterous will send us an email confirming that our post is online.

Posterous will then automatically send your content on to Twitter or any other social network you specify

This setup will obviously only work for posting media files, but the Automator workflow can be altered to suit practically any type of Posterous post. In this instance, my Posterous has been set to autopost anything I send to Twitter, so a tweet with my image as attachment and the title for which I was prompted by Automator will appear immediately after the email is received by Posterous:

A tweet generated via Posterous
A tweet generated via Posterous: this is generated automatically by Posterous as soon as it receives the email sent when the image is saved or dragged to the folder associated with the Automator workflow. The link in the tweet is to the Posterous item.

You can download my own Automator workflow (at your own risk!) and modify it to suit your own tastes. Custom icons are included.