Example Workflow 3: Automate Podcast Preparation


It's hot. It's a revolution. Everybody's doing it. It's Podcasting. So you want to create and publish you're own Podcast, but you don't know how to prepare all the necessary files? Here's how to create a re-usable Automator workflow that will make the process of saving and publishing your GarageBand-authored Podcast a breeze.

Step 1: Export the GarageBand Project

This workflow assumes that you've already recorded your podcast using GarageBand. If you haven't, read this tutorial on how to create a podcast using GarageBand before building this example workflow.

The first step in creating an automated podcast preparation workflow is to export the currently open GarageBand project. In a new workflow window, click on the iPod library group in the Library list on the left to display the podcast actions you installed (See the Before You Begin note on the right side of this page). Select the Export GarageBand Project action from the Action list and drag it into the workflow area of the window.

When the workflow is run, this action will trigger the Export command in GarageBand to save the project as an AIFF audio file and add it to the iTunes playlist indicated the in Export pane in the GarageBand preferences dialog. The result returned by this action will be a reference to the track in the iTunes playlist.

Step 2: Copy the exported audio file

The next step is to make a copy of the exported AIFF audio file so that the original file is preserved and left in your iTunes library for later reference if needed.

Click the Finder library group in the Library list and located the New Folder action in the Action list. Double-click the action name in the list to add it to the end of the workflow.

This action will create a new folder in the indicated location and automatically copy any items passed from the previous action, into the newly created folder. Enter "PODCAST" in the text field in the action view as the name for the folder and choose the Desktop as the location for the folder.

Note that even though the output data type for the first action in the workflow is iTunes songs and the input data type for the second action is Files/Folders, the connection between the two actions is made. This is because Automator has a built-in conversion action that will run invisibly to convert the iTunes song reference into a reference to its file on disk!

Select the Get Folder Contents action from the Finder action list and add it to the workflow. This action will return a reference to the AIFF audio file copied to the newly created folder.

Step 3: Compress the audio file

Podcast audio files are typically posted as MPEG audio files in either MP3 or MPEG 4 format. You can use Automator and QuickTime Pro to compress the AIFF file to a much smaller streamlined AAC file (MPEG 4).

Click the iPod library group and add the Export to MPEG Audio action to the end of the workflow. From the list of possible settings, select the checkbox next to the one named: AAC-128-S-44.1

This setting is the same one used by the iTunes Music Store for its files and will produce a high-quality audio file at a small size. In the action view, select the checkbox to put the compressed file in the same folder as the source file and choose the option to delete the source files when the action has completed.

Step 4: Rename the audio file

The next step is to rename the audio file to a standard format you want to use whenever you create a podcast, as in: podcast-09292005.m4a. To accomplish this task, we'll use the Rename Finder Items action.

In the Finder actions list, double-click the Rename Finder Items action name to add it to the end of the workflow. You'll immediately be presented with the following dialog:

Since the process of naming files is permanent and cannot be undone, Automator is asking if you would like for it to make copies of the items to be renamed so that you aren't altering the originals. In many cases, this is a good thing. In this instance however, we want to rename the previously copied audio file, so click the Don't Add button to continue adding the Rename Finder Items action to the workflow.

Add the Rename Finder Items two more times, clicking the Don't Add button in the warning dialog each time. Set the type of naming action for each of the added actions by clicking on the top popup menu in the action view and choosing: Make Sequential for the first action, Replace Text for the second action, and Add Date or Time for the third action.

Set the various parameters in the action views to the setting in the above illustration. The end result of these three actions will be to rename the passed audio file to the standard name of "podcast" followed by a dash and the current date.

Step 5: Create the Podcast RSS feed file

Every podcast is posted with a special text file, written in XML/RSS, that enables user to subscribe to the podcast. The Create Podcast Feed action will create this file for you, using file and name information from the audio file passed from the previous action.

Click on the iPod library group in the Library list to display the podcasting actions. Double-click the Create Podcast Feed name in the Actions list to add the action to the end of the workflow.

Fill in the requested information in the appropriate text fields, paying special attention to putting the full URL (include "http://" etc.) of the folder on the hosting server that you will copy the audio file and feed files into, in the Directory URL field.

Step 6: Save the XML/RSS data to a text file

The result of the Create Podcast Feed action will be the text of the XML/RSS feed. To save it to disk as a file, add the New Plain Text File action from the iPod library.

Enter an appropriate name for the feed file in the Save As field, perhaps: "rss.xml" or "podcast.xml"

From the Location popup menu in the action view, choose Other... to summon the folder picker dialog. In this dialog, click the New Folder button on the bottom left of the window and create a new folder named "PODCAST" on the desktop. Select this folder as the destination folder for the text file to be created.

Step 7: Make the workflow re-useable

This workflow will be designed to be run again and again, whenever you want to publish a podcast. Each time the workflow is executed, it will delete the existing PODCAST folder on the Desktop and replace it with a new one. To accomplish this, add two actions from the Finder library group to the end of the workflow: Get Specified Finder Items, followed by the Move to Trash action.

To move the actions to the beginning of the workflow, click and hold on the numbered circle in the title bar of the Move to Trash action and choose Move before "Export GarageBand Project" from the popup menu. The action will move to the beginning of the workflow!

Now move the Get Specified Finder Items action (now the last action in the workflow) to the beginning in the same manner, by choosing Move before "Move to Trash" from its popup menu. The two actions are now at the top of the workflow.

To finish the workflow setup, click the square "+" button at the bottom left of the Get Specified Finder Items action to summon a file/folder picker. In the dialog, choose the PODCAST folder on the Desktop to add it to the action's list view.

Run the Workflow

With your GarageBand Podcast project open, run the workflow. The result will be two files in the PODCAST folder (the Podcast audio file and the XML/RSS feed file) that you can copy to the folder on the hosting server that you listed in the Create Podcast Feed action.

Save the Workflow

To save the workflow so that it's available when you need it, choose Save As Plug-in... from the Automator File menu. In the forthcoming sheet, select Script Menu and name the workflow Export for Podcast.

The workflow will now be available from the system-wide Script Menu at the top right of the menu bar. Select it from the Script Menu when you want to export the current GarageBand project as a Podcast.