Enterprise Resource Planning Blog Posts by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
chris_scott
Active Participant
0 Kudos
578

Many business users work in Teams, but millions of users make use of Slack for collaboration.

SAP process notifications can be sent to Teams, to SMS or to Slack using this simple integration.

Follow these three steps to build this powerful integration:

1) Create an app on Slack

First of all you need to create an app within Slack.  This is free and easy, and takes only a few minutes in https://api.slack.com/apps

See the quickstart guide: https://api.slack.com/quickstart

chris_scott_0-1719561776715.png

You need to find the OAuth Token for the your app from the ‘OAuth & Permissions’ menu.

chris_scott_1-1719561776750.png

2) Set up a channel in Slack or choose an existing channel, and get the Channel ID from the ‘About’ tab.

You need to identify the channel ID that you are going to send the notification to.

chris_scott_2-1719561776770.png

3) Set up a Workflow in Looply

Create a simple workflow in the Looply Workflow Studio:

chris_scott_3-1719561776739.png

Call this workflow either externally or from another Looply workflow, passing in parameters for the notification in Slack.

In this example, we are passing in two text fields, ‘heading’ and ‘text’, from a separate Looply workflow:

chris_scott_4-1719561776729.png

Set up a function to add text formatting:

chris_scott_5-1719561776781.png

The definition of this function can be generated using Slack’s Block Kit Builder https://app.slack.com/block-kit-builder

chris_scott_6-1719561776717.png
 
return {
  "blocks": [
    {
      "type": "rich_text",
      "elements": [
        {
          "type": "rich_text_section",
          "elements": [
            {
            "type": "text",
            "text": params.heading,
            "style": {
              "bold": true
              }
            },
            {
            "type": "text",
            "text": params.text
            }
          ]
        }
      ]
    }
  ]
}

Finally, add the http request step to send the message to Slack, using the chat.postMessage api, passing in the Token code and the Channel ID:

chris_scott_7-1719561776728.png

Using this simple generic Workflow, you can send a notification to a channel with a heading in bold, and a text beneath.

chris_scott_8-1719561776780.png
 
This video shows the result:
Labels in this area