# Google Contacts

Google Contacts is a contact management service provided by Google. It enables users to store, organize, and easily access contact information, ensuring seamless synchronization across devices and integration with Gmail and other Google services. This makes it ideal for both personal and professional use.

To integrate Google Contacts with ZBrain Flow, follow these detailed steps:

* Click the '+' button in the Flow and search for Google Contacts in the ZBrain Flow.
* Select the specific task from the list you want to include in the Flow. You can perform the below-listed tasks:
  * **Add Contact**: Add a new contact to a Google Contacts account.
  * **Custom API Call**: Make a custom API call to a specific Google Contacts endpoint.
  * **Search Contacts**: Search for specific contacts in a Google Contacts account.
  * **Update Contact**: Update an existing contact in a Google Contacts account.

### **Add Contact** <a href="#add-contact" id="add-contact"></a>

Add a new contact to a Google Contacts account.

#### **How to Configure** **Add Contact** **to ZBrain Flow?** <a href="#how-to-configure-add-contact-to-zbrain-flow" id="how-to-configure-add-contact-to-zbrain-flow"></a>

* Create a connection with your Gmail ID and save the connection with a proper name in the **Connection** field.
* Provide the **First Name** of the contact.
* Provide the **Last Name** of the contact.
* Provide the **Job Title** of the contact.
* Provide the **Company** name of the contact.
* Provide the **Email** of the contact.
* Provide the **Phone Number** of the contact.

### **Custom API Call** <a href="#custom-api-call" id="custom-api-call"></a>

Make a custom API call to a specific Google Contacts endpoint.

#### **How to Configure** **Custom API Call** **to ZBrain Flow?** <a href="#how-to-configure-custom-api-call-to-zbrain-flow" id="how-to-configure-custom-api-call-to-zbrain-flow"></a>

* Create a new **Connection** or select an existing connection from the **Connection** drop-down.
* Select the URL and provide the base URL.
* Select the desired **Method** from the drop-down.
* Provide the **Headers.** These are key-value pairs sent along with the API request to convey additional information (e.g., authentication tokens, content type). Headers help the server process your request correctly. Authorization headers are injected automatically from your connectio&#x6E;**.**
* Provide the **Query Parameters** object. These are appended to the URL and are typically used to filter or modify the request. For example, adding `?status=active` might limit results to only active records.
* Include the main data payload (in formats such as JSON or form data) in **the Body** when making a request to create, update, or process the server's information.

### **Search Contacts** <a href="#search-contacts" id="search-contacts"></a>

Search for specific contacts in a Google Contacts account.

#### **How to Configure** **Search Contacts** **to ZBrain Flow?** <a href="#how-to-configure-search-contacts-to-zbrain-flow" id="how-to-configure-search-contacts-to-zbrain-flow"></a>

* Create a new **Connection** or select an existing connection from the **Connection** drop-down. Select the Google Contacts account or connection credentials used to authenticate your requests and access contact data.
* Provide the **Query.** Enter the plain-text query (e.g., a name or keyword) to match contacts. The system uses this text to find relevant contacts in your Google Contacts database.
* Select the **Read Mask** value from the drop-down. It specifies which contact fields (e.g., names, email addresses, phone numbers) you want to retrieve from Google Contacts. By limiting the returned fields to those you need, the read mask helps optimize performance and manage the scope of contact data.
* Provide a **Page Size** that Indicates how many results should be returned, up to a maximum (e.g., 30). Additional results pages can be fetched if you have more contacts than this limit.

### **Update Contact** <a href="#update-contact" id="update-contact"></a>

Update an existing contact in a Google Contacts account.

#### **How to Configure** **Update Contact** **to ZBrain Flow?** <a href="#how-to-configure-update-contact-to-zbrain-flow" id="how-to-configure-update-contact-to-zbrain-flow"></a>

* Create a new **Connection** or select an existing connection from the **Connection** drop-down.
* Provide the **Resource Name,** which is the unique identifier assigned to each contact (e.g., `people/c12345`). It tells Google Contacts which specific entry you want to update. An ASCII string in the form of people.
* Provide the **Etag**, which ensures contact updates only apply if the contact hasn't changed since the last retrieved. This is used for concurrency control. If the contact was modified elsewhere since you last fetched it, the ETag check can prevent overwriting changes inadvertently.
* Select **Update Field Mask** from the drop-down. It defines which fields (e.g., name, email, phone numbers) should be updated in the contact. This helps avoid unintentionally modifying other attributes.
* Provide the **First Name** of the contact.
* Provide the **Last Name** of the contact.
* Provide the **Job Title** of the contact.
* Provide the **Company** name of the contact.
* Provide the **Email** of the contact.
* Provide the **Phone Number** of the contact.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/google-contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
