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.
- Access the url https://myaccount.google.com and turn on two step verification as shown below
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 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.
- Gmail certificates should be uploaded to CPI Start the Cloud Platform integration tenant and choose the Operations views and Connectivity Test.
2) Click on connectivity Tests and choose SMTP and enter the settings as shown below
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 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 Security Material from Operation View
Click on Security material and choose Create User Credentials
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.
- Create a new integration Flow as shown below as shown below
Create SOAP To Email Integration Flow
2) Configure SOAP adapter Settings as shown below
SOAP Adapter Settings
3) Configure mail adapter Settings as shown below
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 point url of deployed integration
D) Invoke the end point url from postman.
-
- Start post man and choose post and enter the url that you copied
In 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.
- Body of the message can be any valid soap message and make sure your choose content type as XML
- Click the Send button and make sure that you receive a success message
- Check your receiver email account to see this message with body having the above xml
- Start post man and choose post and enter the url that you copied
Great start! Well explained each steps..
Keep sharing more and more...
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?
in the HTTP Settings check if you have XCRSF token check box - This should not be checked.
Best regards
Ramesh
This was really helpful, thank you very much!
Thanks a lot!
Thanks for a good blog.
super !!
This valuable content should be added to the default documentation of CPI