Google‎ > ‎Apps Script‎ > ‎Domain Shared Contacts‎ > ‎

Setup

PRE-REQUISITE

Taken from the Google Apps Help document - https://support.google.com/a/answer/60218
  1. Turn ON your Global Directory and contact sharing in your Google Apps admin console

  2. Go to Apps > Google Apps > Contacts > Settings for Contacts and select these settings:

Enable contact sharing
Show all email addresses
Show both domain profiles and Shared Contacts
Domain and public data

Just like this one...


1. SET UP THE SHEET

  1. Setup the correct timezone in the Spreadsheet, go to File > Spreadsheet Settings

and set the Locale and Timezone for your region

  1. Set the timezone for the script, go to Tools > Script Editor

  1. Then in the script go to File > Project Properties

  1. Then change the Timezone to your region (it must match the spreadsheet timezone)

  1. Click Save

  2. In the script file, go to Resources > Advanced Google Services...

  1. And make sure the Admin Directory API - Directory_v1 is turned ON

  1. Click OK


STOP: If you are using newer versions 1.1+ then you don't need to complete the next section and go directly to User Guide - Getting Started. The next step is for older versions only.

For Older versions only (1.0)
1. Get the Sheet ID by copying the ID from the URL of the Sheet (you will need this in the next part of the setup

2. In the Script choose the Code.gs file and add the following information which is located at the top of the code file


3. Add only the details highlighted in RED

var SPREADSHEET_ID='YOUR_SHEET_ID'; <- FROM THE PREVIOUS STEP
var DOMAIN = "yourdomain.com"; <- YOUR GOOGLE DOMAIN var SHEET_NAME = 'google'; <- THIS SHOULD BE THE SAME UNLESS YOU CHANGE THE SHEET TAB NAME var ERROR_RECIPIENT_MAIL='you@yourdomain.com'; <- YOUR EMAIL ADDRESS FOR ERROR REPORTING

4.
Save and close the script file
5. Go to the User Guide - Getting Started for help on using the script
Comments