Skip to Content
Technical Articles

Cloud Platform Integration – Gmail configuration and Integration Flow

In this blog I will describes the steps to setup.  It is assumed that you have setup your cloud foundry trial services – activated the Integration suite and created the Integration Service instance.

If you are new to Cloud Platform Integrations Please look at 

https://developers.sap.com/tutorials/cp-starter-isuite-onboard-subscribe.html

https://developers.sap.com/tutorials/cp-starter-integration-cpi-onboard-subscribe.html

Part A – Set up the gmail app account.

  1. Access the url https://myaccount.google.com and turn on two step verification as shown below

Turn%20on%202%20step%20Verification

Turn on 2 step Verification

  2) Create App password so that CPI can use this app password with your email id to send messages.  Click on App Passwords and create a app password with your app name

App%20Password

App Password

Copy the password that is displayed

3) Enable your account so that less secure apps can access your account.   This should be done for testing and then you can disable this option.  Scroll down and turn on access to less secure apps.  If this option does not appear it means that you have not enabled 2 factor verification.

PART B) Cloud Platform Integration Set up to enable gmail messages.

  1. Gmail certificates should be uploaded to CPI                                                                                   Start the Cloud Platform integration tenant and choose the Operations views and Connectivity Test.CPI%20Connectivity%20Test

2) Click on connectivity  Tests and choose SMTP and enter the settings as shown below

gmail%20SMTP%20Test%20and%20Download%20Certificates

gmail SMTP Test and Download Certificates

 

On the right side click on the download button and download the zip file.  When you unzip it there are two certificate files these should be uploaded to CPI certificates

3) Upload the two certificates

From the operations view select keystore and choose add and then certificates – give a name to each of these two files and confirm the selection

Upload%20gmail%20certicates

Upload Gmail Certificates

 

4) Setup Security material to create an account that links your gmail account and the app password that you created earlier.  The password you enter here is not your gmail password but the app password.

Choose%20Security%20Material%20from%20Operation%20View

Choose Security Material from Operation View

 

Click on Security material and choose Create User Credentials

 

Create%20User%20Credentials

Create User Credentials

 

Give it an name, the user is your gmail.com email add and password is the the app password you created and click Deploy.

 

C)  Create An Integration Flow to send Soap Message to gmail account.

  1. Create a new integration Flow as shown below as shown below

Create%20SOAP%20To%20Email%20Integration%20Flow

Create SOAP To Email Integration Flow

 

2) Configure SOAP adapter Settings as shown below

SOAP%20Adapter%20Settings

SOAP Adapter Settings

 

3) Configure mail adapter Settings as shown below

Mail%20Adapter%20Settings

Mail Adapter Settings Connections

  Mail Adapter Settings  Processing

 

Save the integration Flow and Deploy the integration.  Check in the operations view that the integration has started and note the end point url

End%20point%20url%20of%20deployed%20integration

End point url of deployed integration

 

 

D) Invoke the end point url from postman.  

 

    1. Start post man and choose post and enter the url that you copied                                      Postman%20Url%20and%20AuthorisationIn the Authorization  you should enter client id and client secret  that you will get from integration instance that you created on the your cloud space.
    2. Body of the message can be any valid soap message and make sure your choose content type as XML
    3. Click the Send button and make sure that you receive a success message
    4. Check your receiver email account to see this message with body having the above xml
3 Comments
You must be Logged on to comment or reply to a post.
  • Hi guys, I am trying to follow the tutorial of this mission: https://developers.sap.com/tutorials/cp-integration-create-basic-flow.html, I made all the settings as indicated in the procedure (they are similar to those are indicated here)... the integration endpoint appears as started/published; However, when I try to test in Postman, after put Auth information and BodyRequest, I always receive a Status 401...someone knows it could be causing this error?