Gmail (Custom)

The Gmail (Custom) connector uses a Google service account to manage Gmail settings and messages on behalf of a domain user. This connector supports actions to forward addresses, delegate, configure vacation responder settings, configure IMAP and POP settings, and enable Pub/Sub notifications for new messages. Each action specifies the mailbox to act on through a User id field, so a single connection can manage any mailbox the service account is authorized to impersonate.

Install Gmail (Custom) from the community library

Complete the following steps to install the Gmail (Custom) connector from the community library:

1

Open the recipe editor and search for a connector. Alternatively, you can search for a connector in the community library.

Search for recipe editorSearch for community connectors in the recipe editor

2

Select the community connector you plan to install.

3

Click Install to install the connector from the community library.

Click installClick Install

4

Select Release connector. Alternatively, select Review code to review and modify the connector code before releasing it to the workspace.

Release connectorRelease the connector

5

Summarize any changes you made to the connector, then click Release to allow workspace collaborators to use the connector in recipes.

The Confirm release dialogThe Confirm release dialog

Connection setup

The Gmail (Custom) connector uses OAuth 2.0 authentication.

Gmail (Custom) setup

To connect to Gmail (Custom) in Workato, set up the following:

Set up your Google Cloud project

Complete the following steps to set up your Google Cloud project:

1

Log in to your Google Cloud Console.

2

Create or select an existing Google Cloud project.

3

Enable the Gmail API in the Google Cloud Console.

1

Click APIs & Services > Enabled APIs & Services.

2

Search for and select Gmail API in the search bar.

3

Click Enable.

Set up your service account

Complete the following steps to create a service account with domain-wide delegation:

1

Log in to your Google Cloud Console.

2

Click Select or create a New Project in the project dropdown.

3

Go to IAM & Admin > Service Accounts and click Create Service Account.

4

Enter a name for the service account in the Name field.

5

Click Create and Continue > Done.

6

Click on your newly created service account and go to the Keys tab.

1

Click Add Key > Create New Key.

2

Download the service account JSON key file.

7

In the Google Admin console, authorize the service account's client ID and grant the following OAuth scopes:

  • https://www.googleapis.com/auth/gmail.settings.sharing
  • https://mail.google.com/
  • https://www.googleapis.com/auth/gmail.modify
  • https://www.googleapis.com/auth/gmail.readonly
  • https://www.googleapis.com/auth/gmail.settings.basic

Super admin access is required to authorize the service account's client ID and grant domain-wide delegation. Refer to the Google Workspace admin help documentation for more information.

Connect to Gmail (Custom) using OAuth 2.0

Complete the following steps to connect to Gmail (Custom) in Workato:

1

Click Create > Connection or press C twice.

2

Search for and select Gmail (Custom) as your connection on the New connection page.

3

Provide a unique name for your connection in the Connection name field.

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Enter the client_email value from the service account JSON key in the Issuer field.

6

Enter your JSON private key in the Private key field. Refer to Google's service account documentation to learn more about service accounts.

7

Click Connect.

Last updated: