Resources »

Guides »

Integrations »

Google »

Cerb + Gmail

Introduction

In this guide we’ll walk through the process of linking Cerb to Gmail. You can use the same process with any Google API from Cerb bots to automate whatever you need.

Configure Google APIs

Create a new project

  1. Log in to: https://console.cloud.google.com/apis/ as a workspace user.

  2. Click Create Project in the top right.

  3. Enter:

    Project Name: Cerb
    Organization: (your organization)
    Location: (your organization)
  4. Click the blue Create button.

  5. Click Select Project in the notification in the top right.

  1. Select OAuth consent screen in the left sidebar.

  2. Enter:

    User Type: Internal (only available in workspaces)
  3. Click the blue Create button.

  4. Enter:

    Application name: Cerb
    Scopes for Google APIs: email, profile, openid
    Authorized domains: (your Cerb base URL; e.g. cerb.me)
  5. Click the blue Save button.

Enable Gmail API

  1. Click Library in the left sidebar.

  2. Search for Gmail and select Gmail API.

  3. Click the blue Enable button at the top of the page.

Add credentials

  1. Click Create Credentials in top right.

  2. Enter:

    Select an API: Gmail API
    What data will you be accessing: User data
  3. Click the Next button.

  4. Click the Add or Remove Scopes button.

  5. Select https://mail.google.com/ (Gmail API) from the list.

  6. Select https://www.googleapis.com/auth/userinfo.profile from the list.

  7. Click the Update button.

  8. Click the Save and Continue button.

  9. In Application type select Web application.

  10. Enter:

    Name: Cerb
    Authorized redirect URIs: https://YOUR-CERB-HOST/oauth/callback
  11. Click the blue Create button.

  12. Click the Download button.

  13. Click the Done button.

Configure Cerb

Create the connected service

  1. Navigate to Search » Connected Services.

  2. Click (+) button in the right of the gray bar above the worklist.

  3. In the Library tab, select the Google package.

  4. Paste your Client ID and Client Secret from the credentials you downloaded earlier.

  5. Scope:

     
     https://mail.google.com/ https://www.googleapis.com/auth/userinfo.profile
     
     
  6. Click the Create button.

Create the connected account

  1. Navigate to Search » Connected Accounts.

  2. Click (+) button in the right of the gray bar above the worklist.

  3. Select Google.

  4. Enter:

    Name: Gmail (you@example.com)
  5. Click the blue Link to Google button.

  6. Log in with your Google account.

  7. Click Allow.

  8. Click the Save Changes button.

Next steps

See: Authenticate a Gmail mailbox using IMAP and XOAUTH2