# Google Contacts

## Overview

The Google Contacts connector allows the user to read, create and update contacts and contact groups belonging to a Google Account.

## Authentication

Click on the **New Authentication** button:
![add-auth](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-550b03d3_../../../../../images/add-auth.png)
This will open up a window which allows the authentication to be named and also displays the scopes that will be requested.
![docs-selecting-scopes](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-359a3c84_docs-selecting-scopes.png)
Once the next button has been hit, you will be redirected to Google and asked to approve the authentication request.
![docs-google-auth](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-eec89c9c_docs-google-auth.png)
Once it has been approved, you will be redirected back to the workflow view and the authentication will be ready to use.

## Note on Operations usage

As the [Google Drive](https://tray.ai/documentation/connectors/service/google-drive/) connector holds most of the permissions available for downloading Google files (regardless of type) - it is recommended to try revising your workflow to include this connector, should you face any Google file downloading issues.

## Example 1: Creating a new contact

This example will walkthrough how to create a new Contact for your contact directory on Google.
The first step is to choose the `Create contact` operation.
![select\_create](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-2312824d_docs-select_create.png)
The first required field is `User email`. `User email` input refers to the account that contact book belongs to. The value `default` which is provided means it will be placed into the contact book of the account that you authenticated with.
![user\_email](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-ad7b3a93_docs-user_email.png)
For this new contact, a name will be provided using the name input object.
![supply\_name](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-2982e1f6_docs-supply_name.png)
As well as a name, it will be associated with an email address. This is done by creating a new email object in the email array.
![supply\_email](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-ad5b5ccd_docs-supply_email.png)
This example contact needs to be assigned to a group. This can be done by suppling a group that it belongs to in the Group membership info object.
![supply\_contact\_group](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-d75b51a5_docs-supply_contact_group.png)
A note needs to be attached to this contact as well. This can be done using the `notes` field found in the input panel.
![supply\_notes](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-f2ba203b_docs-supply_notes.png)
The workflow can now be ran as the contact is ready to be created. As can be seen, it ran successfully.
![successful\_run](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-456f2bff_docs-successful_run.png)
It can also be seen on the Google Contacts UI.
![google\_contacts](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-fe5c5191_docs-google_contacts.png)

## Example 2: Creating a new contact group

This example will walkthrough how to create a new Contact group for your contact directory on Google.
The first step is to choose the `Create contact group` operation.
![select\_group\_create](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-d0bbfcc3_docs-select_group_create.png)
The first required field is `User email`. `User email` input refers to the account that contact book belongs to. The value `default` which is provided means it will be placed into the contact book of the account that you authenticated with.
![user\_email](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-ad7b3a93_docs-user_email.png)
For this new contact group, a name will be provided using the name field.
![input\_group\_name](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-4267a3fa_docs-input_group_name.png)
Added information about the new group can be added using `key:value` pairs in the extended properties object.
![input\_extended\_properties](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-01a90d02_docs-input_extended_properties.png)
The workflow can now be ran as the contact group is ready to be created. As can be seen, it ran successfully.
![succesful\_run](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-1466e234_docs-succesful_run.png)
It can also be seen on the Google Contacts UI.
![in\_google](https://tray.ai/documentation/images/connectors/service/google-contacts/b8acbd87-9cc997e9_docs-in_google.png)
