|
| 1 | +--- |
| 2 | +title: Enable Gmail BCC integration |
| 3 | +pcx_content_type: how-to |
| 4 | +sidebar: |
| 5 | + order: 2 |
| 6 | +--- |
| 7 | + |
| 8 | +To enable Gmail BCC integration: |
| 9 | + |
| 10 | +1. Log in to [Zero Trust](https://one.dash.cloudflare.com/). |
| 11 | +2. Select **Zero Trust** > **Settings**. |
| 12 | +3. Select **SaaS Integrations**. |
| 13 | +4. Select **Add integration** > **Google Workspace**. |
| 14 | +5. Select **Select Integration**. |
| 15 | + |
| 16 | +## Create an integration |
| 17 | + |
| 18 | +Name your integration, then select **Next**. |
| 19 | + |
| 20 | +### 1. Create a Service Account in your GCP Project |
| 21 | + |
| 22 | +1. Once you have named your integration, select **Next**. |
| 23 | +2. On the [Google Cloud Console](https://console.cloud.google.com/welcome/new), go to the sidebar, select **APIs & Services**, then select **Credentials**. |
| 24 | +3. Select **CREATE CREDENTIALS** > **Service account**. |
| 25 | +4. Fill in the details to create a service account: |
| 26 | + - **Service account name**: Enter `Message Retraction Service Account`. |
| 27 | + - **Service account ID**: Enter `message-retraction-service-acc`. |
| 28 | + - **Service account description**: Enter `Email Security Message Retraction`. |
| 29 | + - Select **CREATE AND CONTINUE**. |
| 30 | +5. In **Grant this service account access to project**, select **Select a role** > Choose **Owner**. Select **CONTINUE**, then select **DONE**. |
| 31 | +6. Go back to **Credentials** on the sidebar, and select your service account under **Service Accounts**. In **Details**, take note of the **Unique ID**. |
| 32 | +7. Select **Advanced settings** > **VIEW GOOGLE WORKSPACE ADMIN CONSOLE**, then enter your password. This will redirect you to the Google admin portal. |
| 33 | +8. On the sidebar, select **Security** > **Access and data control** > **API controls** > Select **MANAGE DOMAIN WIDE DELEGATION**. |
| 34 | +9. Select **Add new** > Add a new client ID: |
| 35 | + - **Client ID**: Enter the **Unique ID** you took note of in step 5. |
| 36 | + - **OAuth scopes**: Enter the following URLs: |
| 37 | + |
| 38 | + ```txt |
| 39 | + https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.user.alias.readonly, https://www.googleapis.com/auth/gmail.labels, https://mail.google.com/ |
| 40 | + ``` |
| 41 | + - Select **AUTHORIZE**. |
| 42 | + |
| 43 | +### 2. Create a JSON Key for your Service Account |
| 44 | + |
| 45 | +On the [Google Cloud Console](https://console.cloud.google.com/welcome/new), select **Service Accounts** on the sidebar: |
| 46 | + - Select the three dots, then: |
| 47 | + - Select **Manage keys**. |
| 48 | + - Select **ADD KEY** > **Create new key**. |
| 49 | + - Select **JSON** > Select **CREATE**. This downloads a `.json` file which you will use at a later stage. |
| 50 | + |
| 51 | +### 3. Upload JSON Key |
| 52 | + |
| 53 | +On the [Zero Trust dashboard](https://one.dash.cloudflare.com/), upload the `.json` file downloaded on step 3. |
| 54 | + |
| 55 | +### 4. Enable Necessary Google Workspace APIs in GCP |
| 56 | + |
| 57 | +Enable the following APIs on the Google Cloud Console: |
| 58 | + - [Enable Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com?project=winter-surf-439414-h1) |
| 59 | + - [Enable Google Drive API](https://console.cloud.google.com/apis/library/drive.googleapis.com?project=winter-surf-439414-h1) |
| 60 | + - [Enable Google Admin SDK API](https://console.cloud.google.com/apis/library/admin.googleapis.com?project=winter-surf-439414-h1) |
| 61 | + - [Enable Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com?project=winter-surf-439414-h1) |
| 62 | + - [Enable Google Service Usage API](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com?project=winter-surf-439414-h1) |
| 63 | + |
| 64 | +### 5. Log in to Google Workspace Admin Console |
| 65 | + |
| 66 | +Log in to Google Workspace Admin Console: Enter your password and log in to the Google Workspace Admin Console. |
| 67 | + |
| 68 | +### 6. Create a Domain-Wide Delegation API Client |
| 69 | + |
| 70 | +1. Copy the **Client ID** and **Scopes** displayed on the Zero Trust dashboard. |
| 71 | +2. On Google Admin, go to **Security** > **Access and data control** > **API controls**. |
| 72 | +3. Select **MANAGE DOMAIN WIDE DELEGATION** > **Add new**. |
| 73 | +4. Use the Client ID and copy the scopes to create a new API client. Refer to [Delegate domain-wide authority to your service account](https://cloud.google.com/chronicle/docs/soar/marketplace-integrations/google-alert-center?_gl=1*skktsb*_ga*MTMxODg5NDExMy4xNzI5NjA1MzYy*_ga_WH2QY8WWF5*MTcyOTc3MDg2Ny40LjEuMTcyOTc3MDg5OC4yOS4wLjA.#delegate_domain-wide_authority_to_your_service_account). Then, select **Next**. |
| 74 | + |
| 75 | +### 7. Confirm Workspace Administrator Email |
| 76 | + |
| 77 | +Enter the email associated with the Google Workspace Administrator account. Your email must match the email associated with your Google Workspace account, or else your integration will not work. |
| 78 | + |
| 79 | +### 8. Create integration |
| 80 | + |
| 81 | +1. Select **Create integration**. |
| 82 | +2. Once you created your integration, you will be redirected to the **Review details** page, where you will be able to review **Integration details**. |
| 83 | +3. Review your details, then select **Complete Email Security set up** > **Continue to Email Security**. |
| 84 | + |
| 85 | +## Next steps |
| 86 | + |
| 87 | +Now that you have created an integration, you will need to [connect your domains](/cloudflare-one/email-security/setup/post-delivery-deployment/bcc-journaling/bcc-setup/gmail-bcc-setup/connect-domains/) for Email Security to start scanning your inbox. |
0 commit comments