Search code examples
google-sheetsautomationdirectorygoogle-appsgoogle-sites

Google Contacts Dir in Google Sites


I am currently making a Google Site where I would like to embed my contacts. The contacts I am referring to can be found if I log into my gmail account and click on ->Mail->Contacts on the upper left hand corner. Then, on the next page, I click the "Other Contacts" link.

I have tried using a google spreadsheet to read in this data and then displaying that in the Google Site. However, I ran into a few issues. I tried the IMPORTHTML("https://mail.google.com/mail/u/0/#contacts/group/26ae/Other+Contacts","table",1). This didn't return anything. I tried to change the second parameter to 'list' and for the third parameter, I went up to 30 so I doubt that is the issue.

I also tried this approach but no luck. https://www.import.io/post/how-to-get-live-web-data-into-a-spreadsheet-without-ever-leaving-excel/

What would be the best way to resolve this issue of getting those contacts to show up in my site?


Solution

  • I see three options:

    1. Export your contacts to a CSV and import that into a sheet. The downside is that this is not syncing, it is a static update, so maintaining contacts can be problematic.
    2. Use this addon. I have never used it and can offer no advice either way. I believe your domain Admin will need to set it up and I do not think it populates a spreadsheet, so you won't be able to embed your contacts.
    3. Write a custom Google Apps Script. The benefit here is you could use a script to also display the contacts in a clean fashion, with the name as a link, or otherwise. The downside here is you need to write a script. It is javascript based so if you have someone who can do that, it may be your best option. I have done this for a staff directory, which lists all of our domain accounts: enter image description here