Import Skype contacts into Gmail 31 Jul, 2012 Import Skype contacts into Gmail

Gmail's contact details includes provision to add usernames from other IM networks. Having this in one place is very handy on the Android phone, for instance.

Naïvely exporting Skype's address book via Skype > Contacts > Advanced > Backup contacts to file & importing them into Gmail isn't sufficient. This process imports the contact information alright, but not the skype names, defeating the purpose of the import.

A little digging up reveals the culprit. Skype uses the vCard v3.0 Property X-SKYPE-USERNAME:, while Gmail expects X-SKYPE:. So, here is some wizardry to fix this (on a Linux/Unix machine).

  • Export contacts to skypename.vcf file from Skype > Contacts > Advanced > Backup contacts to file, and copy it to a linux machine.
  • I did not want the pictures of my Skype contacts to be imported. I filtered out the relevant fields using: egrep "^BEGIN:|^END:|^VERSION:|^TEL;|^EMAIL:|^ADR:|^N:|^FN:|^X-SKYPE-USERNAME:" skypename.vcf > skype-cleaned.vcf
  • Change the vCard property to match Gmail's expectations: sed -i s/-USERNAME// skype-cleaned.vcf
  • Prettify the vCard file to include newlines after each vCard entry (note: this step is not absolutely necessary). sed -i "s/^END:VCARD/END:VCARD\echo -e '\n\n'/g" skype-cleaned.vcf
  • Import skype-cleaned.vcf into Gmail & choose to merge contacts appropriately.

Tags  ·   skype  ·   import contacts  ·   gmail  ·   Show Comments ▾

Original design for Tumblr crafted by Prashanth Kamalakanthan.
Adapted for Tumblr & Jekyll by Sai Charan. Customized theme available on Github.

Sai Charan's blog by Sai Charan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Creative Commons License