A Symfony console application to sync contacts from Planning Center to Google Groups. The application queries both sources for lists named after distribution groups. It then diffs the contacts and makes sure the Google group mirrors the contacts found in Planning Center.
All dependencies can be installed using the Composer PHP dependency manager. Once Composer is installed, download this repository and run the following command:
composer installIncluded in the config folder is a parameters.yml.dist file. Complete the following steps:
- Copy this file and rename it
parameters.yml. - Fill in all of the tokens with configuration for Planning Center and Google.
- Make sure the
listsparameter is completed with the lists to sync from Planning Center into G Suite. - Run
bin/console sync:configureto get a Google G Suite token.
To configure the command by provisioning a token with your Google G Suite user, run the following command:
bin/console sync:configureThe command will provide a Google authentication URL which will require you to login with a G Suite Groups administrator and paste the provided the access token back to the command. If a valid token has already been provided, the command will exit gracefully.
| Parameter | Description |
|---|---|
| --force | Forces the command to overwrite an existing Google token. |
Note: the resulting Google token is stored in the var/google-token.json file. If at any time you have problems with Google authentication, delete this file and rerun the sync:configure command (or use the --force parameter).
To sync contacts between lists, simply run the following command:
bin/console sync:runThis will fetch the lists, run a diff, and display information for changes it is making to the groups.
| Parameter | Description |
|---|---|
| --dry-run | Computes the diff and outputs data without actually updating the groups. |