Skip to Content
Technical Articles
Author's profile photo Sharadha Krishnamoorthy

Serverless Extensions – Part 2: Configure SAP Cloud Platform Open Connectors to connect to Whatsapp and Twitter.


Serverless Extensions
Part 1 – Introduction and Set up messaging queue in SAP Cloud Platform Enterprise Messaging
Part 2 – Configure SAP Cloud Platform Open Connectors to connect to Whatsapp and Twitter.
Part 3 –Set up SAP Cloud Platform Backend service and create a oData service to be consumed by SAP Cloud Platform functions.
Part 4 – Set up functions in SAP Cloud Platform Functions and connect them to the queues and open connectors 
Part 5 – Bring it all together – Testing the extension end to end.

This is one of my favourite services offered in the SAP Cloud Platform and it is super easy to set up and use. I have discussed the service – SAP Cloud Platform Open connectors in 2 of my blogs. Please refer them for the information about the initial steps.

Our scenario requires setting up of two connectors – Twitter and Twilio(Whatsapp).

Set up Twitter Connector

Launch the ‘Open Connectors’ application. It will take you to the admin screen which lists the available connectors. In the connectors menu, look for the ‘Twitter’ connector and select ‘Authenticate’.

Enter a name for your instance and click ‘Create Instance’

This will authenticate you with your twitter account and take you to the API documentation page. This page lists the APIs available to connect with Twitter.

For our scenario, we need the Post operation on ‘Statuses’ entity to tweet on the authenticated account.

Let us do a quick test.

Click ‘Try it out’. Enter the JSON as shown below. This contains the status text to be posted to Twitter.

Click execute.

You should be able to see the tweet in the twitter account.

In the CURL script which is displayed after execution, notice the POST URL and the Authorisation string. We will be using this in Part 4 where we call the connector from SAP Cloud Platform Functions.

Set up Twilio  Connector for Whatsapp

This has already been described in great detail in the following blogs. Please refer them and set up the Twilio connector for sending Whatsapp messages.

Ferry Djaja’s blog on Whatsapp Chat interface

Sravya Gajavelli‘s blog on integrating Whatsapp with SAP UI5 Application

Similar to the twitter connector, make note of the POST URL and the Authorisation string. We will need it to send WhatsApp messages from Functions.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.