I’m using Mac OS X Lion with iCloud. My address book ‘lives’ on iCloud and I’ve gat a number of groups in the address book.

Under Snow Leopard I used Automator to export addresses from a group using the following actions:

  1. Get Selected Address Book Groups (Get selected “groups”)
  2. Get Contact Information (Export Format “Spreadsheet (tabs)” with all fields selected, and Add Labels checked)
  3. New Text File (Save as: “addresses.txt”, where “Desktop”)

– this worked like a charm, but since I got to use Lion, I only get the header filled with the labels, no addresses.

Although I do have a workaround (i.e. selecting all cards of a group and using “people” instead of “groups” in the first action of the workflow), I run in other problems like the fact I can’'t export to the MAC Roman encoding but must use UTF-8. In that case the address lines are garbled with mysterious spurious characters.

Is there a way to retrieve the individual contacts from a selection of Address Book groups in Automator, or is this a bug in Lion?

1 Answer 1


Apparently, Lion’s Automator actions are a bit more finicky about implicit data conversion between actions than Snow Leopard’s. In your case, the issue is the “Get Contact Information” action does not perform a conversion from groups into their contained contacts. This can be solved quite easily by inserting a “Get Selected Address Book Items” action set to “people” after the first one (which retrieves the selected groups) before the “New Text File” action. This will allow you to select groups in Address Book instead of having to select all their constituent members.

As to the encoding issue, that does not seem to have anything to do with the Automator workflow: testing with my iCloud address book (German, with lots of Czech and French contacts) neither your nor my variant produce any issues writing UTF-8 text as long as the “New Text File” action’s file format is set to “text (.txt, convert if necessary)”. If the issue persists on your system when using these settings, possible causes I can think of are

  • TextEdit (or your editor of choice) is set to display the file as another encoding than UTF-8; in that case, it would mangle them on display.
  • your address book might contain differently encoded characters, possibly from importing from older systems: Address Book is very good at hiding these, but they can cause a number of odd issues. There are a number of utilities out there claiming to fix broken Address Book records, but I have never tested them – YMMV.
  • Thanks for going to the trouble of writing your response. But I preempt your solution in the fifth paragraph. And in that solution the Automater action outputs strange characters between the street, zip-code and city fields.
    – nanitous
    Commented May 21, 2012 at 8:49
  • @nanitous: I’m not suggesting you set your first action to select people; I am suggesting you leave your first action as is, but insert a second “Get Selected Address Book Items” action after the first, which you set to “people” – that will correctly map from the group selected in Address Book to all its contacts. As to the encoding issue, that is not from Automator – I tested both your and my solution on my iCloud address book (German with Czech and French contacts, i.e. lots of non-ASCII chars) – no issues. See my suggestions for possible causes if yours behaves differently.
    – kopischke
    Commented May 21, 2012 at 14:02
  • sorry for the late response, but my own macs are not yet running Lion, so I had to wait until I got one in my hands. And, indeed you are right, your solution provides precisely the desired result. Thanks for your extensive explaination and thanks again!
    – nanitous
    Commented Jun 8, 2012 at 12:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .