Save over 40% when you secure your tickets today to TNW Conference 💥 Prices will increase on November 22 →

This article was published on June 7, 2011

How to Create Mac OS X Services with Automator


How to Create Mac OS X Services with Automator

If you own a Mac computer, chances are you’ve seen the Services menu around the operating system. Often if you check to see what’s in there, it’s empty. Apple has actually included a tool within OS X itself that can help you write your own services and doesn’t require you to know any programming or scripting languages. Automator is a fairly powerful and useful application that most users will never even open. Here’s a quick tutorial on how to use it.

Step 1: Figure out your problem

The first thing to do before you make a service for OS X is figure out exactly what the problem you’re trying to solve is and what a good solution would be. There are a number of different tasks that Automator can handle, so try to figure out all of the different things you need this service to do before you get into making it.

Once you have figured out what you want to do, open Automator and select Service from the menu you are presented with. Once you do, you’re shown a screen that can look intimidating at first, but it is actually fairly straight forward.

As an example we’re going to make a service that will convert your video files into iTunes-compatible files and add them to iTunes.

Step 2: Making your workflow

The 💜 of EU tech

The latest rumblings from the EU tech scene, a story from our wise ol' founder Boris, and some questionable AI art. It's free, every week, in your inbox. Sign up now!

On the left side of your screen is your library. These are all the functions that Automator can perform for you using either text or a file as its input. Take some time and look through the different actions you have available here to see what you can do and if any match the task you want to complete.

Before you add any actions to your workflow, make sure you change the option that says “Service receives selected” to the proper file type. In our case it’s a movie file.

Now we will look through the actions and drag in whichever ones we want to use in our service.

For converting our movie file, Automator has a built-in Export Movies action which we can use. Simply drag that action over to your workflow area and it will be added to the workflow in the order that you placed it.

You can set options on different actions. On this one, I want to see that the movie is converting, so I turn on the “Show this action when the workflow runs” option.

Your workflow may look like this when you're done.

You can add as many actions as you want to a workflow, as long as they actually work with the input that you have selected. In the case of our video exporting workflow, I also want to set the default application for the service, as well as have the file opened and added into iTunes, so I drag those files over as well.

Step 3: Save it and use it

Once you have everything you want in your service, simply move to the file menu and save it with an easy to remember filename as this will become your service name. Once it is saved, you will be able to access it from the services menu when you have the proper input file or text selected. Now if I highlight a movie file and go to the services menu, I can select Export Video to start my workflow.

If you notice there is a problem with your service you can easily open the service again in Automator, make any changes you need, and save it again.

While this is far from an exhaustive look at Automator, it is important to remember that you have this tool at your disposal. There are plenty more functions that you can use, and I find the best way to learn is to experiment for yourself and see what you can come up with. There are also a number of great resources online that can help you get started.

You’re not limited to Services. You can create folder actions that will activate whenever a file is dropped into a folder, as well as a standalone applications.

What services have you built with Automator? Let us know if you’ve got some great ideas in the comments below.

Get the TNW newsletter

Get the most important tech news in your inbox each week.