The Gmail adapter of Oracle Integration Cloud enables us to create an integration with the Gmail application. This is one of the OOB adapters that Integration Cloud offers.

In this particular article, we’ll show you how to create Gmail connection using Google Email adapter.

Prerequisites for Creating a Connection

To use the Gmail adapter, we must have access the Gmail APIs. So to access the Gmail APIs, we must create the Gmail project.

Below are the steps to create Gmail project:

  • Click on the New Project

  • Enter Project Name(ICSGmailConn) and click on the Create button
  • Once the project is created, make sure the newly created project(ICSGmailConn) is selected in the dropdown list
  • Search Gmail API and Select the same
  • Click ENABLE
  • On the right-hand side, click CREATE CREDENTIALS button
  • Click on the Credentials from the left navigation
  • Click on the Create Credentials drop down and select OAuth Client ID
  • Select Web application from the application type
  • In the Name field, specify a name for the OAuth 2.0 client ID credential
  • In the Authorized Redirect URI field, enter the following URL and click Create button

For example:

  • Once created, it will give the client id and client secret. Copy and paste the same at a safe location because it would be required at the time of Connection creation
  • Optionally, we can set the Scope for Google APIs from the OAuth consent screen page
Now let go ahead and create the Gmail adapter connection.

  • Login into the Integration cloud console and move to the Connection
  • Click on the Create button and search for the Google Mail adapter and select
  • Enter connection Name(Gmail_conn) as per your choice and Click on Create button
  • Click on the Configure Security button and enter below information
    • Client Id: Enter the client id which was copied earlier
    • Client Secret: Enter the client secret which was copied earlier
    • Confirm Client Secret: Enter the client secret which was copied earlier
    • Scope: Enter the scope for which the adapter functionality is limited to as below. For the time being, enter and click on the Provide Consent button
  • Clicking the Provide Consent button will take to the different window where it will ask you to enter the Integration Cloud credentials(if already not logged-in in the same window). After which, it will prompt to enter the Gmail credentials from which we have created the client id and client secret. If already logged-in select the Gmail account and click Allow button
  • Once the consent is successful, Access Allowed page will come up
  • Go back to the Integration Cloud connection page and Test. If everything is OK, the connection will reach 100%