The Google Thunderbird address book: staying in sync

Configuring sync with Google is easy.  Select an addressbook to sync with Google, and choose:

  • Personal Address Book if you want contacts auto-added by Thunderbird to appear in Google.  You’ll have one set of contacts.
  • zindus/yourname@gmail.com if you want to manage your Google contacts separately from other contacts.

When you first sync an addressbook, you may encounter Google’s rules for contacts:

  • an email address can only appear in one contact
  • no empty contacts

These rules are enforced in Gmail’s contact interface and to sync with Google, your Thunderbird addressbook must comply with them too.

Early versions of the Zindus addon took a “hands off” approach to rule violations by simply reporting them.

The addon now displays a summary of Google rule violations:

Google Contact rule violation example

In this example, three contacts reference the same email address.  “bloggs,fred” is selected because it is the contact with data in the most fields.

‘Confirm’ preserves the selected contact and deletes the other two.

‘Skip’ leaves the contacts unchanged.  You make the necessary edits using the Thunderbird addressbook.

Select ‘don’t ask’ if you want the addon to fix subsequent rule violations without asking:

  • if several contacts reference an email address, the addon preserves the ‘best’ one and deletes the rest
  • if contacts are ‘empty’ (meaning there is no data in any fields that map to Google) then they are deleted.

The ‘don’t ask’ feature is turned off by default.  Rule violations are mostly fixed on the first sync and never encountered again.  But a few users find themselves bumping into rule violations on an ongoing basis, possibly because of Thunderbird bugs or Google glitches.  For these folks, the ‘don’t ask’ preference allows safety to be traded off against conveniece.

zindus/ToBeDeleted

As a nod to safety, unsynced contacts “deleted” when fixing Google rule violations are actually moved into a addon-managed addressbook named zindus/ToBeDeleted. This feature is a poor-man’s workaround to the absence of a “Trash for contacts” feature in Thunderbird or Google.  zindus/ToBeDeleted is emptied frequently and its purpose is to assist with recovery of “oops, I chose the wrong contact” mistakes.  Note that any Google contacts in this addressbook will only contain those fields that map to Thunderbird.

If you liked this Blog, share the love :                    

40 Responses to “The Google Thunderbird address book: staying in sync”

  1. Lukas Zapletal Says:

    WOW! Great, thanks!

  2. Mark Bick Says:

    This is a very smooth add-on and works great for me. Thanks for taking the time to produce a well crafted add-on.

  3. Lee Bazalgette Says:

    Hi,

    Thanks for this great plug in!

    I’m trying to use Zindus to co-ordniate an address-book between OSx and Win Xp using a Google account and Thunderbird. The only problem currently is that it looses first-name and last-name data between the machines, which means if I try and export to back up to Mac address book I loose the names of the people!

    Is there a fix for this?

    Thanks again,
    Lee

  4. rvjc Says:

    Excellent add-on!! The autosync capability is currently bi-directional which is a bit dangerous for my application. I just deleted ALL my Gmail contacts when I cleared my thunderbird address book AFTER sync had been established…oops!

    It would be nice to have a configuration setting to enable uni-directional syncing only i.e. from Gmail contacts to PAB but NOT vice versa. Most Gmail users now prefer to use Google’s web interface but it’s nice to have a minimal traditional mail client configured to send mail e.g. when the user right clicks a file and clicks “Send to”->”Mail Recipient”. The only problem with that solution up to now was that Gmail contacts were not available in the mail client address book…but that is now solved by Zindus…subject to the above feature request.

    Keep up the good work!

  5. leni Says:

    Lee

    Currently if you want to use Google to sync two thunderbird addressbooks, only the fields that are common to both thunderbird and google are synced.

    A fully sync is certainly something that folk want. One thought is to use Google’s ExtendedProperties feature to store the full set of Thunderbird fields.

    A problem with ExtendedProperties is that Google limits the number ExtendedProperties a contact can have. This means that the feature isn’t guaranteed to be available to the addon, so it might work for some users, maybe even most, but not all. It’s even possible that for any given user, it’d work for some contacts but not others. And even a small percentage of problems generates a lot of support email!

    This isn’t to minimise the issue - we’re just not satisified that ExtendedProperties is the right approach.

    rvjc

    I’ll file a feature request to support one-way sync. If/when this gets implemented it really should support:
    one way tb ==> google and
    one-way google ==> tb

    Like most other feature requests, if there’s enough interest, it’ll get put on the roadmap.

  6. BN Bender Says:

    At first, I didn’t think it worked. Then I restarted my Google and all my contacts showed up. Der! Wonderful. Very easy to use.

  7. Tommy Says:

    I think this is a great plugin, and plan to recommend it on my blog. One feature request: would it be possible to do one way syncs? I never edit info in Google Contacts, only in Thunderbird, and it would help me sleep better at night knowing that my Thunderbird data would not be touched.

  8. leni Says:

    Hi Tommy, +1 noted for you on one-way sync. It’s now one of the feature request candidates.

  9. MNH Says:

    Hah…….removed all my gmail contact when I accidently remove all contact in thunderbird addressbook. Accidents happens. Would be nice to have a confirmation or a basic security regarding removing contact from other than the gmail webmail access.

    Great plugin. My usage senario :

    1. One gmail account for the school
    2. One gmail account for each teacher

    All teachers sync to school’s contact list.

    Works like charm. Thank you.

  10. Ben Says:

    Has anyone else been experiencing an unresponsive script error?

    I looked in my error console and it shows: Error: [Exception… “‘Failure’ when calling method: [gIMsgFolder::GetMessageHeader]” nsresult: “0×80004005 (NS_ERROR_FAILURE)” location: “” data: no]

    Anyone know about this?

  11. leni Says:

    Ben: Which version are you using? The unresponsive script message sometimes occurred with large (5000+ contact) addressbooks in versions 0.8.4 and earlier. This should have been fixed in 0.8.5. The message you see in the error console is a Thunderbird error, unrelated to the addon.

    If you’re on 0.8.5 and getting an “unresponsive script” dialog box, you can click OK and the addon will keep syncing. To help identify exactly which part of the addon is causing the problem, it’d be helpful if you filed a bug report.

  12. Ben Says:

    Thank you. TB had not advised me of a new version. My address book has 3000+ contacts. I’ll download and try 0.8.5. Many thanks.

  13. Ben Says:

    Leni,
    I did try 0.8.5, and it worked! Thank you. I don’t know how you can get the Mozilla site to advise Thunderbird that an upgrade is available, but I think this is a critical upgrade. Many thanks.

    ben

  14. Wayne Says:

    This Plugin is great it works for me exactly what I needed. I would like to request if it is possible to have it not only sync contacts but but also groups with in the contact list. Thank you

    Wayne

  15. Jose Casal Says:

    Nice Plugin!
    What’s the default frequency with which zindus/ToBeDeleted is emptied? Is it possible to change it?
    Thanks a lot!
    Jose

  16. leni Says:

    Jose, see the preference:
    extensions.zindus.system.gd_trash_expire_seconds

    Each sync deletes from zindus/ToBeDeleted those cards that been there longer than this. If there’s no cards there, the addressbook is deleted too, and recreated when necessary.

  17. Joseph Says:

    I love the idea of a one-way sync from Google -> Thunderbird. My ideal scenario would be, while using Google Apps, to have one shared address book that gets modified by only a few people but syncs with every person’s Thunderbird address book.

    Looks like Google finally started allowing non-Google Apps accounts to be added to shared contact lists http://www.google.com/apps/intl/en/business/new.html “Administrative management of non-employee contacts now available”

    Has anyone tried this with their Premier Google Apps accounts? How does it work with this Thunderbird plugin?

  18. Steve C Says:

    I access an IMAP email account from different computers. I want to synch the Thunderbird address books and collected addresses on the different computers for that one account. I do not want to synch those address books with any google email account. Can I do that?

  19. leni Says:

    @Joseph - the addon doesn’t use Google’s Shared Contacts API. Even though this is a feature that’d only be available to Google Premier Edition users, if it’s something that people want, feel free to ask!

    @SteveC - this is a common request. One option is if you are willing to run your own Zimbra server you could use that to sync addressbooks between your two Thunderbird instances.

  20. PVD Says:

    Zindus is working though I can only add contacts (with an email address) from my Gmail account down to Thunderbird. If I add a new contact in Thunderbird - it will not upload to Gmail. Any ideas?

  21. leni Says:

    Hi PVD, are you adding the contact to a Thunderbird mailing list? Mailing Lists and the contacts in them aren’t synced (yet).

    If you think you might be encountering a bug, feel free to file a bug report and include the email address of the Thunderbird contact that should be syncing but isn’t.

  22. PVD Says:

    I don’t have lists, just different address books. I made changes to the personal address book. I did however recycle my Google page and then the changes appeared so that problem has been resolved. Though I don’t like the fact that my addresses are not converting over. So I am trying out the gContactSync addon. This too is problematic for me to get them to sync. But I hope with Thunderbird 3 the two will work better. Sorry Zindus.

  23. GN Says:

    Hi

    After the sync, the address book in Thunderbird is not showing the display name in the name field but showing the “name” before the @sign of the email id. How can this corrected.

    Also what happens if the contact has more than one email id?

  24. leni Says:

    @GN: if a thunderbird contact doesn’t have a display name the Thunderbird AddressBook UI shows the part of the email address to the left of the ‘@’ sign. This is just how the Thunderbird AddressBook UI works and is unrelated to sync. You can experiment with this yourself by creating a Thunderbird contact with no Display Name. As far as sync goes, if the contact on the remote server has a Display Name it’ll match the Display Name of the corresponding Thunderbird contact.

    > Also what happens if the contact has more than one email id?

    See the FAQ on Google contact conversion or Zimbra contact conversion. In Summary: Thunderbird primary and secondary email addresses are synced with the first and second email addresses on the remote server.

  25. GN Says:

    Hi Leni

    Thanks for the quick reply but all my contacts have display names since my google contacts are in sync with my Nokia phone. Ok, I rechecked and changed the view in the TB to show name as Display name and is now ok, since earlier it was set to show name as First,Last.

    Multiple emails are present as mentioned by you, however google and nokia allow multiple entries in number fields e.g I have multiple mobile nos against a contact but zindus seem to select only one no per field. This is essential and need to be fixed. These fields show multiple entries with a comma separating them in TB address book and this is unlimited no. For one contact I have around 20 mobile phones and all show up in google contacts, my phone and TB (synced in a different way) but not by Zindus

  26. leni Says:

    @GN Currently TB only supports one mobile phone number field. The addon syncs the first remote mobile phone number with that field.

    There is a TB feature request to support multiple mobile phone numbers (see bug 118665. If/when that feature makes it into Tb (it looks like it might make tb3) then the addon will sync all Google (and Zimbra) phone numbers with Thunderbird.

  27. GN Says:

    Like I said earlier in the one mobile phone number field all 20 nos (or multiple nos) are shown by providing a comma between them. I am able to use it now by syncing my phone with TB through SW sync and it works with out any hiccups even in sync between google and my phone.

    Cheers

  28. Jonathan Wells Says:

    I also would like the feature Joseph suggested of syncing with the shared address book in google apps, I havent been able to find anything that does this yet.

  29. leni Says:

    @Joseph, @Jonathan - +1 noted!

  30. Torrey Says:

    I just have a quick maybe dumb question as I have looked and haven’t found anything. I am currently using thunderbird 2.0.0.12 along with gmail and google sync for my blackberry. The problem I have is that if I add a contact via blackberry it syncs to my gmail but doesn’t sync with thunderbird. Now if I add a calendar there are no problems as everything works flawlessly. If I add a contact to thunderbird it syncs to google and then onto my blackberry. I use my blackberry majority of the time for adding contacts and calendars so any help to this would be greatly appreciated.

    Thanks

  31. leni Says:

    @Torrey, the zindus addon isn’t “push sync” so when you sync Google < ==> blackberry it doesn’t force a Google < ==> Thunderbird sync. Thunderbird < ==> Google sync is initiated by the addon - you can force it by clicking the “Sync Now” button, otherwise sync is initiated by the auto-sync timer.

    If you see a contact in Gmail and then click “Sync Now” in the addon it should appear in Thunderbird. If it doesn’t, check that the Google contact isn’t completely empty and that it’s not a suggested contact that you’ve asked to be ignored.

    If you still can’t work out why the Google contact isn’t syncing, feel free to file a bug report.

  32. Jerry Says:

    I’d love to see the one way sync with an option in the preferences to do this. Either google to TB or TB to google. This way I’d be less likely to delete all of my contacts.

    thanks, J

  33. Mark Says:

    When I create a contact in Google’s address book and then sync to Thunderbird, only the display name appears in Thunderbird, not the First Name, Last name fields, so that when I open my TBird address book, those names without First and Last Fields filled in appear at the very top of the list and show only phone numbers. I have to open them up in Thunderbird and add the information in the Last Name, First Name fields. Then when I resync, I end up with 2 entries in the Google address book, both looking identical.

    Is this by design or?

    Thanks,
    Mark

  34. Wayne Says:

    I want to add another vote for the ability to do a one-way sync. I’m shying away from this addon because although I don’t mind losing my TB contacts, I can’t afford the risk of losing my Google contacts.

  35. Grendel Says:

    What happens, if the addressbook in Thunderbird gets corrupted and Zindus syncs both adressbooks before it’s restored? In that case Google contacts, if intended to be used as a backup are deleted, too, correct? Is there any way to prevent the deletion of contacts in GMail?

  36. leni Says:

    @Wayne, @Jerry, +1 noted for one-way sync

    @Mark, Google doesn’t support first+last name, only display name. If you fill in first+last in the Thunderbird contact and then reset to force a slow sync, the slow sync should still pair up the TB and Google contacts, even though the TB contact has first+last filled in.. ie you shouldn’t get two contacts. If you do get two contacts, can you file a bug? I tried to reproduce this and couldn’t.

    @Grendel, to trigger a Google delete, it would have to be a very particular kind of TB addressbook corruption. eg appear to be ok but at the same time tell the addon that there were no contacts. Anything is possible of course, but other than your report there hasn’t been any other reports along this line. I’ll note +1 for you for one-way sync, which would allow you to say “never delete a contact at google”.

  37. Grendel Says:

    @Leni, when TB crashes and the adressbook is open, it creates a replacement automatically. The original adress book is renamed to *mab.bak. On the next program start, the adressbook is empty and appears to be ok. See

    http://kb.mozillazine.org/Moving_address_books_between_profiles#Recovering_corrupt_address_books

    One way sync is a possible solution, but even easier prevented by a manual user confirmation in case all contacts would get deleted.

  38. leni Says:

    @Grendel, thanks for pointing this out. Will file an enhancement request along the lines you suggest - requiring manual confirmation if all remote contacts are to be deleted. It will be in the next release.

  39. Jeff Says:

    Hey,

    If I change details in thunderbird it wont change in google??? Can anyone help? Thanks

  40. leni Says:

    @Jeff, if you change a contact in Thunderbird and want to see the results immediately in Google, visit Tools/Zindus then click ‘Sync Now’. Then click ‘reload’ in your browser to force it to refresh it’s cache from Google’s servers.

    Another thought: the addon doesn’t sync contacts that are in mailing lists.

Leave a Reply