How to use IBM App Connect with Gmail

Gmail is Google's free web-based email service that provides storage for emails, chat, and archiving.

Use IBM® App Connect to connect Gmail to other applications like Slack. For example, when emails are received in Gmail, you are notified immediately in Slack.

Availability:
  • A connector in IBM App Connect on IBM CloudCloud-managed connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release)
  • A local connector in a Designer instance of IBM App Connect in containers (Extended Update Support)Local connector in containers (Extended User Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)

Connecting to Gmail

To connect App Connect to Gmail, you can use the website OAuth 2.0 authorization method. You need to provide an OAuth 2.0 client ID, client secret, and update the authorized redirect URI for your Google application. For more information, see Connecting to a Google application using the website OAuth 2.0 authorization method.

To connect App Connect to Gmail, you can also use basic authentication with OAuth credentials. You need to provide an OAuth 2.0 client ID, client secret, access token, and refresh token with selected scopes for Google APIs. For more information, see Getting OAuth client ID, client secret, access token, and refresh token for Google applications.

To connect to Gmail from the Catalog page of the App Connect Designer for the first time, expand Gmail, then click Connect. For more information about ways to connect to Gmail, see Managing accounts in App Connect.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.

What to consider first

Before you use App Connect Designer with Gmail, take note of the following considerations:
  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
  • The New email event can process emails up to 10MB.

Events and actions

Gmail events

These events are for changes in this application that trigger a flow to start performing the actions in the flow.

Emails
New email

Gmail actions

These are actions on this application that you want a flow to complete.

Emails
Send email
Delete email
Retrieve emails
Update email labels
Note: When you insert a Send email action in a flow, you can add one or more attachments by using the Attachments array field. The total size of the attachments cannot exceed 25 MB.
  • The ability to add attachments is available only in an instance of App Connect Designer 12.0.5.0-r3 or later.
  • If you are using App Connect Designer in containers and your workflow expects frequent large payloads, the default value of the memory upper limit for running the designerflows container might be too low. You can increase this value by updating the spec.integrationServer.containers.designerflows.resources.limits.memory setting in the Designer custom resource. For more information on the default values for this parameter, see Custom resource values.

Examples

For examples of using Gmail in flows, see the following resources:
Screenshot of the dashboard tile for a template that uses Gmail

Use templates to quickly create flows for Gmail.

Learn how to use App Connect templates to create flows that connect Gmail to other applications. For example, open the Templates gallery, then search for Gmail.