Automator Tip #5: Add Address Book Contacts to Gmail

The Automator tip of the week walks you through one way to extract the contact information from Address book and put it into a format that you can upload to Gmail.

Gmail accepts csv files for importing contacts. Unfortunately Address Book does not export directly to csv. Why it doesn’t is a puzzle in it self, but thankfully we can get the same results through Automator with the use of some Microsoft Office actions.

To create a csv file Automator of your contacts in Address Book add the following actions to a workflow:

  1. Find People in Address Book, Set Whose to Name, is not equal to, and then use * in the input field – This tells automator to look through all the names in your address book and return everyone that doesn’t have a * in their name.
  2. Get Contact Information, Export Format: Spreadsheet (tabs) – This gathers all the information about each contact and puts it into a standard format we can work with.
  3. New Text File – I named it contacts.txt and saved it to my desktop – This will write the information from address book to a text file
  4. Import Text Files to Excel Workbook – Select New Workbook and mark the delimiters as Tab
  5. Save Excel Workbooks – Save Workbooks as contacts, on the desktop and select CSV(Comma Delimited) as the format

Import Address Book CSV File to Gmail

If everything was constructed correctly you should be able to run the workflow and 2 files will be written to your desktop. From here we can import our contacts.csv file into Gmail.

To import your contacts.csv to gmail:

  1. Login to Gmail
  2. Click Contacts
  3. Click Import
  4. Choose your contacts.csv file and click Import
  5. Follow the final instructions from Gmail and verify your contacts imported correctly
Gmail - Contacts -

Now that we’ve showed how to complete this process with Automator, there is also an application – A to G that was built do extract Address Book Contacts and place them in a CSV file.

Importing Contacts from Gmail into Address Book is a bit easier.