Importing GMail Contacts into Lotus Notes
Some time ago I posted a few comments about setting up my Nokia E61 (see First steps with a Nokia E61). One thing I still had to manage was importing my GMail contacts into the headset’s address book. After some troubleshooting I finally found a convenient way to do that: I export GMail contacts, import them into Lotus Notes and sync everything with Nokia’s PC Suite. This method allows me to merge my personal contacts (stored in GMail) with my work contacts (stored in Notes) and have both sets available on my mobile. I was able to do it coding a small Lotuscript that parses GMail contacts exported as a Google’s CSV file and adds them to the Notes address book database.
I’ve been using the script for several months and decided only now to publish it. My timing however couldn’t be worse… Those cool guys at Google have just released an update to GMail including improved contact management and the possibility to export contacts as a vCard file. The vCard file can be easily imported into Notes through standard menu functions.
Nevertheless, my script is still useful if you’re not happy with how fields (name, address, phone number, etc.) are imported using the vCard file or if you want to get full control over how single contacts are imported. It is called ImportGMailContacts and you can download it visiting the Downloads page or directly by clicking here. Below are some notes which should help you configure and use it. Some knowledge of how Notes works and scripts are coded is required.
The script has been tested with Lotus Notes version 7 and the standard address book database. First, it uses a neat piece of code by Julian Robichauz (http://www.nsftools.com) to read and interpret the exported Google’s CSV file (usually called “contacts.csv”) and then adds each contact contained in the file to Notes address book database (usually called “names.nsf”) under the category “GMail”.
Before importing the script as a new Agent in Notes address book database, edit it customizing the following lines of code:
- line 262: the path of the exported CSV file (default is “c:\contacts.csv”)
- line 266: the name of the address book database (default is “names.nsf”)
- line 312: the name of the category to import the contacts to (default is “GMail”)
Then import the script as an Agent, preferably into a copy of the address book database to first make sure everything works and your contacts remain safely stored. Create a new Agent called “Import GMail contacts” and set it up for example as triggered on the event “Action menu selection”. When you’re done a new item should be visible under the “Actions” menu. Now export GMail contacts to the location and file you specified above and execute the Agent. The contacts should be imported into the category you specified and a pop up window should report the results of the operation.
As I said, I’ve tested and successfully used the script with Notes 7 and the standard address book database. However, it could well be that the address book database you are using has been customized (for example by your company’s IT department): in this case some more work is required to remap the fields of Google’s CSV file to the correct fields of the database. To do this customize the code from line 314 to line 341.
I hope some of you finds the script useful. Anyway, if you don’t have any special need, my suggestion is to stick with the new vCard export function in GMail now that it’s finally available.