# Google

Google provides a standardized way to access their APIs through the Google Cloud Console. This can be done using OAuth (for per-user access) or service accounts (for per-service access). Once configured, you can use your credentials to authenticate the following nodes:

## Google compatible nodes

| Node                          | OAuth                                 | Service Account                       |
| ----------------------------- | ------------------------------------- | ------------------------------------- |
| Gmail                         | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Analytics              | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google BigQuery               | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Books                  | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Calendar               | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Chat                   | <mark style="color:red;">No</mark>    | <mark style="color:green;">Yes</mark> |
| Google Cloud Firestore        | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Cloud Natural Language | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Cloud Runtime Database | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Contacts               | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Docs                   | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Drive                  | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Perspective            | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Sheets                 | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Slides                 | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Tasks                  | <mark style="color:green;">Yes</mark> | <mark style="color:red;">No</mark>    |
| Google Translate              | <mark style="color:green;">Yes</mark> | <mark style="color:green;">Yes</mark> |
| Google Vertex AI              | <mark style="color:red;">No</mark>    | \[TBD]                                |

## Account integration using OAuth <a href="#jho6tmsmfpcy" id="jho6tmsmfpcy"></a>

To begin, you will need:

* A Google account.
* A Google Cloud Platform project for use with iMBrace.

**STEP 1:** Go to [Google Cloud Console](https://console.cloud.google.com/).

**STEP 2:** Navigate to the correct project in the top-left corner. Create a new project if necessary. This can be done by navigating to **\[Projects]** and selecting **\[New Project]**.

**STEP 3:** In the left side-bar, go to **\[APIs & Services] > \[Credentials]**.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FLe1wrWmJgBugcw9WwxZV%2F0?alt=media)

**STEP 4:** Go to **\[Create Credentials] > \[OAuth client ID]**.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FlY0o18UzowtZFtYnsqh5%2F1?alt=media)

**STEP 5:** If you are creating an OAuth ID for the first time, you will need to configure a **consent screen** as well. For more detailed information, see the following [Google help page](https://support.google.com/cloud/answer/10311615?hl=en\&ref_topic=3473162). \
\
Note: Remember to **Publish App** to **In production.**

* Enter **App information**&#x20;

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FyJEWVQLwzLZ2Kvoch7go%2F2?alt=media)

* Enter **Authorized domains:** "<mark style="color:blue;">**imbrace.co**</mark>" and **Developer contact information**

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FnJDcwTfs6E0ckaSjtdZW%2FScreenshot%202023-07-11%20at%2016.57.15.png?alt=media&#x26;token=89a90870-4055-4fac-b781-794efb2a69a7" alt="" width="563"><figcaption></figcaption></figure>

* **PUBLISH APP** to **In Production**

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FauDIPfWBXd3rLynqbNRp%2FScreenshot%202023-07-11%20at%2016.41.29.png?alt=media&#x26;token=77eb0b94-a0b4-478f-9474-fa9fff965b32" alt="" width="563"><figcaption></figcaption></figure>

**STEP 6:** In the left side-bar, go to **Enabled APIs & services** and click **+ ENABLE APIS AND SERVICES** to enable the Google services you need.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FWPrhEdstS1Mufk09YcUQ%2FScreenshot%202023-10-04%20at%2014.33.58.png?alt=media&#x26;token=a21ef846-8996-43c9-b390-e8e2b7de0628" alt=""><figcaption></figcaption></figure>

Search the relevant APIs to be used (For example, Google Docs API, Google Sheets, etc.) and click **Enable**.

<div><figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FiUttJXeqpuaZn80kseSp%2FScreenshot%202023-10-04%20at%2014.39.25.png?alt=media&#x26;token=fe06069c-2289-4424-b042-d849d45e75b4" alt=""><figcaption></figcaption></figure> <figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FOW7fbxDCQFaRKSbPONkx%2FScreenshot%202023-10-04%20at%2014.39.40.png?alt=media&#x26;token=78081c48-58a4-44c1-bfdf-b46ae33564bf" alt=""><figcaption></figcaption></figure></div>

**STEP 7:** In iMBrace, create a new credential and select a integration (Google Docs OAuth2 API, Google Sheets OAuth2 Api, etc.), copy the **OAuth Redirect URL**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FQQoGui2p9EHgRY895ZGs%2FScreenshot%202023-10-04%20at%2013.37.31%20copy.png?alt=media&#x26;token=35aeed59-f14b-4b81-8f9f-1f15f6951b29" alt=""><figcaption></figcaption></figure>

**STEP 8:** In Google Cloud Console, go to Credentials > +CREATE CREDENTIAL > OAuth client ID, enter the information and paste the **OAuth Redirect URL** under **Authorized redirect URIs** to create an OAuth client ID.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FrMCbjqumyczzgTlcipWV%2FScreenshot%202023-10-04%20at%2013.36.22%20copy.png?alt=media&#x26;token=13118636-1efc-4e35-bd76-57115865f773" alt=""><figcaption></figcaption></figure>

**STEP 9:** You will then be presented with the **client ID** and **client secret** for the OAuth client.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2Fy6CB1SEsiHN8kft5IU9J%2FScreenshot%202023-10-04%20at%2013.36.43.png?alt=media&#x26;token=c4a3f41d-afec-4f32-977e-9e11a0b7d575" alt=""><figcaption></figcaption></figure>

**STEP 10:** In iMBrace, paste the **Client ID** and **Client secret** into the corresponding fields. Then click **CONNECT** to complete the authentication.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FvsNU1oivWGZlvUQswD8j%2FScreenshot%202023-10-04%20at%2013.37.31.png?alt=media&#x26;token=16184436-8c9e-4ced-b4d4-afbb7a2e4a6a" alt=""><figcaption></figcaption></figure>

Follow the pop-up window to login to Google account and complete the authentication.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FgPOK7H6DMos879JDCipT%2FScreenshot%202023-10-04%20at%2013.37.51.png?alt=media&#x26;token=28475ccd-3896-4550-813b-a2c474051ed4" alt=""><figcaption></figcaption></figure>

**DONE:** You can see the connected message, the credential can then be used for Google integrations..

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2F3MKnKxFP5qbzP3Dk2cvS%2FScreenshot%202023-10-04%20at%2013.38.02.png?alt=media&#x26;token=15608f2e-fb39-420a-bd83-af965b002b83" alt=""><figcaption></figcaption></figure>
