The Weekly Review

by Chris Bowler

Getting to Know Automator

Ever since purchasing my first Mac, which had Tiger installed, I've been interested in the potential of Automator. Unfortunately, time and opportunities have both been lacking and I've been unable to spend much time with the application.

But that's one of the nice things about having your own blog—things that once were categorized as 'play' can now be categorized as 'work' or 'research'. And since getting serious about my site and posting regularly, there have been a couple of workflows that I thought could possibly benefit from some automation.

Since I like to write about software, I have been including a good number of screenshots. I had been keeping those image files on my hard drive, as well as uploading them to my blog. I was also uploading them to my Flickr account for archiving purposes. Here was my workflow before Automator:

  • take screenshot with Skitch
  • drag image to blog post images folder on hard drive
  • insert image in blog post in MarsEdit from aforementioned folder (this step also uploads the image to my WP uploads folder)
  • upload images to Flickr with FlickrUploader and add to existing TWR set

This is a sequence that was screaming to be shortened or simplified. So I thought it was a good opportunity to get more familiar with Automator. Hopefully I could improve my workflow and save some time.

So after creating my first automator plugin, here is the new workflow:

  • take screenshot with Skitch
  • drag image to desktop
  • Right click on selected images and choose Automator workflow from contextual menu
  • insert image in blog post in MarsEdit from Flickr

The Workflow

The following table lists the actions that make up the completed automator workflow:

Action TypeAction Name
FinderGet Selected Items
MailNew Mail Message
MailSend Outgoing Messages
FinderGet Selected Items
FinderMove Finder Items to Trash

This workflow makes use of a Flickr feature that allows users to post images via email. A small warning here—this is for use only with small numbers of images. The Flickr help page states that the post via email method supports neither large numbers of images nor very large images. This is not an issue for me as I usually have two or three small images at once to upload. And so far the usage has been fine.

After taking the needed screen shots, I ensure they are all selected on the desktop. Then a simple right click and I choose the following option from the menu: More -> Automator -> [Workflow Name]. After a few seconds, the plugin kicks in and a new mail message is generated, filled out with values I have specified within the workflow. The images are added as attachments, the message is sent and then the images are moved from my desktop to the Trash.

Now I can return to MarsEdit and use the Media Manager to grab the files from Flickr and insert to my blog post. Pretty easy.

There are a couple of settings that need to be updated to use this workflow. First, you have to enable your Flickr account to be able to post images via email. This can be done under your account settings on Flickr iteslf.

Secondly, you must authorize MarsEdit to access your Flickr account. You can do this by selecting the Flickr tab on the MarsEdit media manager. See here:

TWR Screenshots

The one negative of this setup comes from using the upload via email. Currently this function does not allow you to specify a set or collection to add the photos to. I hope Flickr adds this in the future.

The positive changes are that the images are stored on Flickr and not my blogs upload folder and that my workflow is much faster and more efficient. The number of steps is the same, but the new steps are much shorter. No more updating files in multiple locations.

Summary

Although it was fun to play around with Automator for a while, this exercise was not without it's frustrations. This was a relatively simple workflow, but it took a longer than I would have thought to get it working the way I wanted. Perhaps it was operator error—it's not like I took time to read the manual

Whatever the reason, I found that it took a lot of playing around with the actions to get them in just the right sequence so the whole workflow ran correctly. There were a lot of test versions that resulted in duplicate images. Others never moved the desktop items to the trash before completion. In the end, it seems the workflows perform the best when each action passes values on to the next, as this one does.

At the very least, I feel more comfortable with Automator now. I'm looking for the next opportunity to automate a repetitive task.

&