Skip to main content
Integration Suite

How to Connect a Slack Channel to the SAP Integration Suite Using the SAP Open Connector

DG Dnyandeep Gawai, Dnyandeep is a software developer at Mindset 4 min read

1. The SAP Integration Suite

SAP’s Integration Suite is a comprehensive Hybrid Integration Platform for the enterprise that covers both SAP and non-SAP integration. In simple terms, Integration Suite is an umbrella of tools that helps us to integrate with SAP and non-SAP systems seamlessly.

Below is the diagram provided by SAP on a broader perspective explaining the SAP Integration Suite.

SAP diagram of Integration Suite capabilities connecting SAP apps, non-SAP apps, governments and B2B partners

Image Source: https://sapsa.se/wp-content/uploads/2020/11/part1sapcloudplatformintegrationsuitesapsa202011.pdf

In this blog, we will see how we can connect any slack channel to the SAP Integration Suite using SAP Integration Suite’s Open Connectors

So let’s first understand what SAP Open Connectors is.

2. SAP Open Connectors

Integrating the various non-SAP applications is a challenge because each non-SAP application would have its own authentication mechanism, API formats, error response structures, and search approach.

SAP Open Connectors provides feature-rich connectors to simplify connectivity and seamless integration with over 160 non-SAP cloud applications. Benefit from connectivity to third-party APIs via harmonized RESTful APIs, with built-in interactive API documentation in OpenAPI Specification, normalized authentication, and built-in security capabilities for safe connectivity to third-party applications. It drastically reduces the time to connect to top non-SAP SaaS applications.

So now let’s come to our main topic, how to connect to Slack channel, a third-party app for us using SAP Open Connectors.

3. Scenario

The notification about a new Purchase Order is to be delivered via Slack.

I assume that you have set up your Integration Suite. If you need help, click the below link and follow the steps to set up the Integration Suite.

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

Now follow the below steps to connect SAP open connector and Slack channel:

Step 1). Create a Slack Account with a Channel

In the top right corner, you can see create account button. Using that, you can create an account in Slack, or you can continue login in with Google.

Sign in to Slack page with the Create an account link outlined in the top right corner

Then you can just enter your email address and press continue.

Slack sign-up screen titled First, enter your email, with an address field and a Continue button

Then in the next step, you have to enter your workspace name as you choose. I have entered here “newpurchaseorders” and clicked on next.

Slack setup step asking for company or team name, with newpurchaseorders entered and Next highlighted

Then enter the project name. I have entered “Training.”

Slack setup step asking what the team is working on, with Training entered and Next highlighted

You can ‘skip this step’ for the following options.

Slack step to add teammates by email, with the Skip this step link highlighted

Now you can see a new workspace has been created for you.

New Slack workspace newpurchaseorders open on the training channel

Then, could you create a new channel where we will push our notification or message from SAP open connector?

Slack sidebar with the plus button next to Channels clicked and Create a channel highlighted

Next, I entered the channel name as notifications.

Slack Create a channel dialog with notifications entered as the name and the Create button highlighted

Step 2). Create a Slack Instance in SAP Open Connector

Login into SAP BTP cockpit and then navigate to your Instances and Subscriptions, where you have subscribed to your Integration Suite.

SAP BTP cockpit Instances and Subscriptions page with the Integration Suite subscription outlined

Here you can see Extend Non-SAP connectivity, which is our open connector. Click on Create Connectors.

Integration Suite capabilities page with Create Connectors outlined on the Extend Non-SAP Connectivity tile

Open Connectors screen with Instances selected in the left navigation and a Create Instance button top right

Choose Instances in the left navigation bar and choose the Create Instance button on the right.

Search for Slack in the search area. Select the Slack icon.

Connectors search box with Slack typed in and the Slack connector tile highlighted

On the next screen, enter newpurchaseorders in the name area (this is the Slack workspace name created earlier). Select the OAuth Scope field. Add: chat: write into the first position.

Slack connector form with newpurchaseorders as the name, OAuth Scope values, and Create Instance highlighted

  • Select the Create Instance button.
  • You will be redirected to Slack and automatically authenticated.
  • Check if you are in the correct workspace and allow access to Open Connectors by selecting Allow.

Step 3). Test the Slack Instance

a) Choose Test in the API docs.

Success message for the new Slack connector instance with Test in the API docs, Add Common Resources and Use in Formula

b) Find the GET endpoint /channels. Select Try it out.

Open Connectors API docs after Execute on GET /channels, showing code 200 and the JSON response body

c) Select Execute. Now you retrieve all the available channels of your newpurchaseorders workspace.

d) Find your newly created channel and notifications in the response body. Find it by looking for the attribute name in the JSON. Store the channel ID (*id*) in a place of your choice.

e) Now, we try to write a message to the notifications channel within your newpurchaseorders workspace to test if our additional OAuth scope parameter works.

f) Find the POST endpoint with the following path: /channels/{channelId}/messages.

POST /channels/{channelId}/messages endpoint with the Try it out button highlighted

g) Click the Try it out button and fill in your notifications channel Id from the previous step.

POST message form with a channel ID entered, text set to My Text in the body, and Execute highlighted

Open Connectors API docs showing code 200 and a JSON response body after Execute

h) Scroll down, set My Text in the last field with name text, and click the Execute button. You should get an HTTP code

Now you can just navigate to your Slack notifications channel and check out your notification channel if the message is posted.

Slack notifications channel with the new My Text message highlighted at the bottom

In this way, we can connect SAP Open Connectors and Slack Channel.

If you have an interest in viewing similar content, visit our blog, here.

View our LinkedIn, here.

Share