Organizing receipts

Mac OS 10.4 has a nice feature called “Automator”, which is an easy-to-use scripting program that you use by dragging modular “actions” into whatever order and then setting options, thus creating a “workflow”.

It’s pretty good for certain things. I use it, for example, to back up my iTunes library file (the iTunes index file, essentially) to my iPod — using a workflow that takes the library, zips it, copies it to the iPod, and finally ejects the iPod.

One of the built-in workflows is called “Save PDF to Web Receipts folder”. It’s set up to show up in the standard OS print dialog. The idea is that when you buy something online, and get that “this is your receipt” page, you can “print” it to a PDF in a particular folder, rather than physically printing out a losable paper copy. Pretty slick.

..except that you can’t name it. It automatically gives the PDF a name matching the title of the receipt web page, which all too commonly is something totally meaningless like “Your Receipt”, or worse, “Thank You!”

Apple kindly makes this a workflow that you can actually open and change in Automator, so I set to trying to figure out how to allow the user to rename the file as it saves. Irritatingly, the built-in “rename file” action doesn’t simply give you an option to specify a name, so I ultimately found the answer with the “Number Sequentially” action.

As they say, a picture is worth a thousand words:

screenshot of Automator workflow

It goes in either /Library/PDF Services/ or ~/Library/PDF Services/

Enjoy.

This entry was posted in Codecraft and tagged , , . Bookmark the permalink.

5 Responses to Organizing receipts

  1. I have found Automator tough to get to grips with. More power to you! I attempted to create an automator workflow that would merge multiple PDF files and allow the resulting file to be given a user selected name and save location.

    I managed the tough work of merging multiple files in to a single document but stumbled on generating a dialog box to prompt for a name and save location. Hopefully Automator will see some usability improvements in the next release of OS X.

    On a different note, if you use Address Book and Google Calendar then check out the Google Calendar Add Utility documented in my blog (http://ekive.com/blog/2006/10/19/google-calendar-add-ut...). This is an Applescript implemented as an Address Book Plug-in.

  2. Strider says:

    If I’ve learned anything messing with Automator, it’s that the “Show Action When Run” checkbox is your friend any time you want the end user to be able to make choices.

  3. S says:

    Have you tried clicking “Options” in the “New Folder” step? If you do, and select “Show selected items” and then “Names” a dialog box will open before the PDF is saved, and it will prompt for a file name.

  4. Strider says:

    Where is this options button? Running Apple’s workflow, hter are no options at any time. Running “Print to PDF” gives you the options button, but the only two choices therein are “Create” and “Cancel”

  5. Strider says:

    I see what you’re saying S — you meant within the workflow itself. Doing that allows us to give a different name for the folder, which is not what we want here. We want to rename the receipt document we’re saving.

Leave a Reply

Your email address will not be published.