Mac OSX Automator: Examples

by

I’ve been on an Automator kick lately.  Automator’s been a standard part of Mac OSX for a few generations now, and it’s been a part of my workflow for awhile, too.  I’m just now starting to go to it first when I’m working on a project and realize I have repetitive tasks.

For those of you unaware, Automator resides in your applications folder and it’s basically a program that will perform automatic tasks that you describe, in the order that you describe it.  If you find yourself performing a redundant task on the computer: renaming files, converting files, resizing images, saving PDFs to specific folders, moving media, backing up files, etc. – why not make those tasks automatic?  Why not allow the computer to work for you?

I could delve into a whole entire lesson and series on Automator (and I might!), but for today, I just want to showcase a couple of different workflows I’ve designed to increase my productivity lately, to give you a glimpse of what Automator can do.

1) Print Plug-in

One of my favorite uses of Automator is to develop an automatic workflow from the Print menu in Mac OSX.  Every time we go to File < Print, a PDF button sits in the bottom-left corner of the screen, waiting for us to use it instead of actually [gasp] using ink and paper.  You could use the Save As PDF… option, rename the file, choose a destination, and then save – but for repetitive items such as receipts, bank statements, transfer confirmations, etc…why not automate those tasks?

Automator Print Plug-in Example | Brian Nagel
Adding the "Reveal Finder Items" action allows me to see where Automator placed the file.

 

2) Service

Services are becoming very handy for me.  Another somewhat hidden feature of Mac OSX that’s been around for awhile, yet I find not many people take advantage its functionality.  You can access services anytime you highlight text or a file from the application’s menu that you’re in (ie: Safari < Services), or from the contextual (right-click) menu.  Using Automator’s powerful workflow capabilities, I can perform tasks on a given file with one click.

I’m a big music/media fan, with a very large (23,000+ song, 450+ movie, 300+ TV Show) iTunes library.  Because of the size of it all, I can’t host the entire library on my 250gb laptop, so I end up storing all of the music locally and then reference the larger video files from networked storage (Contact me with questions!  Post on that topic soon.).  I also acquire music in a variety of ways: directly through iTunes, from CDs, eMusic.com, Amazon.com, etc.  How do I get all of these music files organized appropriately into iTunes?  I can’t just drag and drop.  Because my iTunes is set up as a referenced library, anything I drag and drop stays in its current location and, if I were to delete those files, iTunes would give me the obnoxious I-don’t-know-where-the-original-file-is-what-did-you-do-with-it exclamation mark.  So, that’s where Automator and iTunes’ built in watch folder (found in User < Music < iTunes < iTunes Music < Automatically Add to iTunes) come to the rescue.

Automator Service | Sent to iTunes | Brian Nagel
Once saved, you utilize the Service from the Finder and the file's contextual (right-click) menu.

3) Application

We know what Applications are, but did you know that you could make your own?  Yup, Automator will allow you to do that.  Basically, an Application that you make in automator can either be a self-standing Application or, if it resides on your dock, can perform actions to files that are dropped on top of it.  For my example, I need to do a little bit of explanation.

Most of you know I attend church at New Life Church in Raymond, NH.  I am also a member and co-leader of the worship team there, currently responsible for a variety of tasks including making and managing chord charts, selecting new music, designing keynote slides and various media, scheduling, etc.  I set up a separate User Account on my laptop to dedicate to when I’m working with the church’s media, as I didn’t want that to overlap with my own personal home collection.  Sometimes, however, I stumble across a song, picture, video, etc. that I know I would like to use on the Worship Team account when I’m in my regular User.  How do I get it over there?  Well, I could email items to myself and check it (old school and laborious).  I could use a flash drive or online storage (I do, but it’s slow – plus I have a separate DropBox account for the Church).  I could use Mac OSX’s built-in Drop Box folder through the Finder (but it’s kind of an obnoxious file path to get there).  So – which option works best for my scenario?

I ended up using the last option – Mac OSX’s built-in Drop Box folder (Macintosh HD < User < Public < Drop Box).  Any files placed in there are immediately owned and accessible from the destination user’s Public folder.  I created an Automator Service for that.  But…the last step that I found to be slightly annoying was that when I logged into the Worship Team user account, I had to go through a few steps to access those files.  I created an Automator Application for my workaround, setting the resulting application as a Login Item for the Worship Team user.

Automator Application | From Drop Box to Desktop | Brian Nagel
Set this custom-made application to run on login for the destination user for the most convenient use.

Conclusion

So, certainly a variety of ways to use Automator to have the computer work for you.  Visit Mac OSX Automation or Automator US for more ideas and examples.  Let me know in the comments what you use Automator for!

[nggallery id=1]
14 Responses to "Mac OSX Automator: Examples"
  1. Hi, great post thanks for the simplicity. Could I please get a copy of those scripts for transferring items between users? Another solution I came up with is to share the desktop folders between all users on the mac (do via command I and scull to bottom for sharing). Then I log into the opposing user and open finder to view the desktop folder of the other user, and finally I drag that desktop folder from the other user to my dock so I have a folder permanently accessible whereby anything I drop on the folder will show up in the other users desktop. Lets compare notes.

    Darren.

    • Hi Darren…

      Thanks for getting in touch. Your solution to change the permissions and provide a shortcut to it does work.  I will say, though, that I’m not a big of a fan of changing permissions – I have found that it doesn’t always keep the files as secure or consistent as possible in the long run, whereas the Automator scripts truly give ownership of the files shared to both sides in the “default” nature of the OS. 

  2. It looks like you are pleased with the “Print Plugin” capability based on the above, but your post lacks some detail on the topic.  Your screenshot is actually somewhat insightful.  Any chance you could provide some detail on example Automator workflow for PDFs using a print plugin created in Automator.  

    Personally, I am seeking the ability to create custom notes within Evernote with one of these types of workflows.  I can clarify, if you would like more detail.

    • Hi Kurtois…

      I am happy with the functionality of the Print Plugin – it suits my needs at the moment. As far as Evernote integration, I currently just use a simple one – creating a Print Plugin that tells the PDF to open in Evernote (saved as something like “PDF to Evernote”). It then attaches the PDF to a note automatically, and I fill in the Notebook and Tag details, as necessary.
      The only other idea that I haven’t played around with yet, but is a possibility, to offer more automation is to take advantage of Evernote + Email functionality, having Automator auto-fill the subject line with appropriate notebook and tag references. As I look more to go paperless and use Evernote myself, this might be a direction I go in…

      • Thanks for the reply, Brian.  

        From the above, it sounded like you had a workflow for each type of item (receipt, bank statement, etc.) you wanted to capture.  Or did I read more into it?  Evernote installs a print plugin (if you download the app from their website vs. the Mac App Store) already.  Not sure why you had to create one. 

        Hmmm…the Evernote + Email is possible, but I just feel like that could be a non-elegant way to create Evernote notes.  I would prefer to handle it with just Evernote and whatever else (Preview, Safari, etc; depending on the scenario), myself.  

        I am looking into AppleScripting of Evernote for a portion of this solution.  

        • I DO have a workflow for each type of item (banks, shopping, credit card, etc.), but these workflows were setup prior to my using Evernote. Basically, I have folder/subfolder structure set up in the Finder in the Financial/Type/Year setup and Print Plugin workflows set up to rename the PDF, send it to the appropriate folder, and Reveal in Finder so I could see where it ended up for visual confirmation.
          I created a Print Plugin in my own for Evernote because, at the time, they didn’t have one automatically installed.
          Let me know of you find something a bit more efficient…I just recently purchased a document scanner and am planning on using Evernote exclusively to keep track of these things.

  3.  Hello Bryan – 
    instead of using a networked storage, could I just use one partition for each media type (music, movies, photos, etc), or would it be better  to store each media in different external hardrives?  Also, I would like to know what is the best service for the money, for having additional backup on the cloud?  I have an old macbook which I can’t use apple Icloud, but I would be interested in different options.thank you.

    • Benji…

      Yes, that is a good option to work with partitions. In my opinion, no real difference than using multiple hard drives – but it gives you the convenience of just having one physically plugged in.
      I don’t personally use any complete cloud backup solution (I do use iTunes Match), but have recommended Backblaze to a few of my clients and they have been pleased with the results. Their biggest advantage is (1) unlimited storage space for backup and (2) backup of external hard drives.
      ~Brian

Leave a Reply

PageLines