---
schema_version: "1"
id: cff0bda877df948d6f7abbe21ced930052daffda58b14c27d44fc1bfb0b65421
title: Gmail Connector Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/composer/ms_composer_gmail_reference.md
canonical_url: https://docs.mulesoft.com/composer/ms_composer_gmail_reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 11cef6e693f3495410eee03c373de9b5c091f5609fdf358058bf293e8b9c1bf8
description: MuleSoft Documentation Site
latest: true
---
---
product: Composer
---

# Gmail Connector Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Gmail is a popular email service used by businesses for a large number of communication purposes.
This connector enables productivity by connecting a user’s inbox to other systems like Google
Sheets, Salesforce, or Slack.

## Before You Begin

Gmail Connector requires third-party app access to access restricted data in Google. Before using
the connector, your Google Workspace administrator must
[add one of the following client IDs to the list of configured apps](https://support.google.com/a/answer/7281227#trustorlimit&zippy=%2Cmanage-access-to-apps-trusted-limited-or-blocked)
to create OAuth connections with Composer:

- Production Environment United States:
  `14294369739-rn5ftpjat2mnofvp3gevkvmik0roioe7.apps.googleusercontent.com`

- Production Environment Europe:
  `14294369739-028kk1tl316tgo3a59rtpl6qq6u22d25.apps.googleusercontent.com`

## Connections

To connect to a system, whether it is a source of data or the target where you are sending data, you
must create a connection with that system’s required credentials. You typically connect to different
systems within a flow and can reuse each connection every time you need to connect.

This system requires the following credential information for its connections:

Connection Name

Enter a connection name that will help you remember the details of this connection. You can reuse
connections multiple times in a single flow, and in more than one flow, and the credentials are
hidden after you create the connection. Therefore, it’s helpful to provide a name that easily
identifies this connection from others.

Only you can see the connection. Other users in your Composer app must create their own connections.

Username

The OAuth username that you use to log in to Google.

Password

The OAuth password that you use to log in to Google.

## Triggers

Each flow starts with either a _scheduler_ or a _trigger_. Schedulers are set to a default frequency
of 15 minutes. Triggers, such as "each time a new record is created", are defined by you and provide
multiple options related to the data in your system.

Triggers use a polling process to actively check for new updates from an external system. The
polling frequency is 15 seconds.

This system provides the following trigger options:

On New Email

If you don’t specify a [filter](https://developers.google.com/workspace/gmail/api/guides/labels),
this trigger fires on all emails (received, sent, or drafts). To specify a filter, the following
field is required:

- Filter Criteria

  For example, use `in:inbox` to limit the trigger to new messages in the inbox

### Polling Frequency

For triggers in this connector, the **Polling Frequency** field is required. This field enables you
to select how often Composer makes a request to the underling system API to look for changes to
records in active flows. You can select a different polling frequency for each flow in your
organization. With a shorter frequency, the flow executes more often; however, a shorter frequency
consumes more [API calls](https://docs.mulesoft.com/general/automation-credits-usage-and-rates). For example, if you have
an order management flow, you might require nearly real-time updates, which can be achieved with a
15-second polling interval (which equates to 5760 API calls per day). In contrast, if your flow
updates a pricing catalog, you could poll the flow every hour (which equates to 24 API calls per
day).

## Actions

After you connect to a system and define the trigger or configure a scheduler, you define the
actions that the flow performs. For example, you can copy a record between different systems, such
as Workday and Salesforce. The actions you can perform depend on which system you are connected to.

This system provides the following actions:

Send email

Sends an email. The following fields are required:

- To

- Subject

- Body

To send an email with attachments, the following additional fields are required:

- Attachment content

- Attachment name

Get Attachments

Retrieves all attachments from an email. Images that are attached to an email using the clip icon
are considered attachments, but images that are dragged into the body of an email are considered
embedded images and not attachments. The following field is required:

- Message Id

The Google Gmail connector’s use and transfer to any other application of information received from
Google APIs is subject to the
[Google API Services User Data Policy](https://developers.google.com/terms/api-services-user-data-policy#additional_requirements_for_specific_api_scopes),
including the Limited Use requirements.

**Gmail™ is a trademark of Google LLC.**

## See Also

- [Mulesoft Composer: Overview](https://docs.mulesoft.com/composer/ms_composer_overview)

- [MuleSoft Composer: Getting Started](https://docs.mulesoft.com/composer/ms_composer_prerequisites)

- [Composer Connector Reference](https://docs.mulesoft.com/composer/ms_composer_reference)

- [Knowledge Articles](https://help.salesforce.com/s/)
