|
| 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**. |
| 12 | +3. Select **Email Security**. |
| 13 | +4. Select **Monitoring**: If you have not purchased Email Security, select **Contact Sales**. Otherwise, select **Set up**. |
| 14 | +5. Select **BCC/Journaling**. |
| 15 | +6. Select **Integrate with Google** > **Authorize**. |
| 16 | + |
| 17 | +## Create an integration |
| 18 | + |
| 19 | +1. Name your integration, then select **Next**. |
| 20 | +2. Create a Service Account in your GCP Project: |
| 21 | + 1. On the [Google Cloud Console](https://console.cloud.google.com/welcome/new), select **Credentials**. |
| 22 | + 2. Select **CREATE CREDENTIALS** > **Service account**. |
| 23 | + 3. Fill in the details to create a service account: |
| 24 | + - **Service account name**: Enter `Message Retraction Service Account`. |
| 25 | + - **Service account ID**: Enter `message-retraction-service-acc`. |
| 26 | + - **Service account description**: Enter `Email Security Message Retraction`. |
| 27 | + - Select **CREATE AND CONTINUE**. |
| 28 | + 4. In **Grant this service account access to project**, select **Select a role** > Choose **Owner**. Select **CONTINUE**, then select **DONE**. |
| 29 | + 5. Go back to **Credentials** on the sidebar, and select your service account under **Service Accounts**. In **Details**, take note of the **Unique ID**. |
| 30 | + 6. Select **Advanced settings** > **VIEW GOOGLE WORKSPACE ADMIN CONSOLE**, then enter your password. |
| 31 | + 7. On the sidebar, select **Security** > **Access and data control** > **API controls** > Select **MANAGE DOMAIN WIDE DELEGATION**. |
| 32 | + 8. Select **Add new** > Add a new client ID: |
| 33 | + - **Client ID**: Enter the **Unique ID** you took note of in step 5. |
| 34 | + - **OAuth scopes**: Enter the following URLs: |
| 35 | + |
| 36 | + ```txt |
| 37 | + 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/ |
| 38 | + ``` |
| 39 | + - Select **AUTHORIZE**. |
| 40 | +3. **Create a JSON Key for your Service Account**: |
| 41 | + - On the sidebar, select **Service Accounts**. |
| 42 | + - Select the three dots, then: |
| 43 | + - Select **Manage keys**. |
| 44 | + - Select **ADD KEY** > **Create new key**. |
| 45 | + - Select **JSON** > Select **CREATE**. This downloads a `.json` file which you will use at a later stage. |
| 46 | +4. **Upload JSON Key**: Upload the `.json` file downloaded from step 3. |
| 47 | +5. **Enable Necessary Google Workspace APIs in GCP**: Select the links below to enable each API: |
| 48 | + - [Enable Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com?project=winter-surf-439414-h1) |
| 49 | + - [Enable Google Drive API](https://console.cloud.google.com/apis/library/drive.googleapis.com?project=winter-surf-439414-h1) |
| 50 | + - [Enable Google Admin SDK API](https://console.cloud.google.com/apis/library/admin.googleapis.com?project=winter-surf-439414-h1) |
| 51 | + - [Enable Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com?project=winter-surf-439414-h1) |
| 52 | + - [Enable Google Service Usage API]([https://console.cloud.google.com/apis/library/serviceusage.googleapis.com?project=winter-surf-439414-h1](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com?project=winter-surf-439414-h1)) |
| 53 | +6. **Log in to Google Workspace Admin Console**: Here, you will be given the service account Domain Wide Delegation from the admin console. |
| 54 | +7. **Create a Domain-Wide Delegation API Client**: 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](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**. |
| 55 | +8. **Confirm Workspace Administrator Email**: 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. |
| 56 | +9. Select **Create integration**. |
| 57 | +10. Once you created your integration, you will be redirected to the **Review details** page, where you will be able to review **Integration details**. |
| 58 | +11. Review your details, then select **Complete Email Security set up** > **Continue to Email Security**. |
| 59 | + |
| 60 | + |
| 61 | +## Next steps |
| 62 | + |
| 63 | +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