First step is to create a Next Matter Bot in your Slack workspace that is authorized to send messages on behalf of Next Matter.

1) Create Bot

  • Go to https://api.slack.com/apps?new_app=1 (Maybe you need to login before you can create the bot)
  • Click on green "Create new app" button on the top right hand side
  • Enter App Name "Next Matter Bot"
  • Select your workspace
  • Click on Create App

2) Set Permissions

  • On the page displayed, click on the "Permissions" button.
  • On the following page under "Scopes" click on "Add an oAUTH scopes" button
  • Add "channels:read" as a scope
  • Click the button again and add "chat:write" as a scope

Final result should look similar to this image

3) Publish Bot

Scroll back to the top of the page and click on green "Install App to Workspace" button.

Click on Allow and copy/save the displayed token. You will need it later.

4) Retrieve channel ID

Next Matter needs to know the channel ID in order to post messages. We show you how to get it.

  • Navigate to https://api.slack.com/methods/conversations.list/test
  • Paste the token from step 2 into the field "Or, provide your own token"
  • Click on "Test Method" button
  • Hit Ctrl+F (or Command-F on Mac) to open the search function of the browser.
  • Search for the name of the channel where you want to post messages.
  • Above the name, you'll find the ID, post this ID into the next field Example: This is where the ID is located in the window (sample of where the ID is located in image below)

5) Add bot to channel

Open your slack app and select the channel where you would like to post messages.

  • Click on the little "gear" icon in the top right corner of the channel.
  • Click on "Add an App"
  • Type "Next Matter" in the search bar and the bot should appear
  • Click Add
  • A message should appear in the channel, that the bot has been added to the channel

6) Configure notification message in the process

Almost there, now you just need to add the slack notification to your process.

  • Navigate to the relevant process and click on "edit process"
  • Click on "+Add step" on the left hand side
  • Click on "HTTP request"
  • In the HTTP request click on the little gear icon on the right hand side
  • Enter the label, e.g. "Slack notification"
  • Select Method "Post" and past the URL https://slack.com/api/chat.postMessage
  • Click on "add a header" and add "content-type" as value and "application/json" as key without the quotation marks
  • Click on "add a header" again and enter "Authorization" as key and "Bearer TOKEN FROM STEP 2" (e.g. Bearer xoxb-364112219455-984287128723-fdFgS2QR9Vb83Iqz8tNW6KMW) as value without the quotation marks
  • As body, add { "channel": "CTZN263F5", "text": "The preparation for {{process_name}} {{instance_name}} has just been initiated. Please provide your input here {{instance_url}}" } The channel ID is replaced with the id from step
  • The text can be altered according to your needs.
  • Drag the step to the right position in the process and you're all set. If you have any questions, please reach out to the Next Matter team. Result would look similar to this:

Congratulations, your Next Matter Bot in the channel is ready to go. If you want to add notifications at other points in the process or in other processes, you only need to repeat steps 4 to 6.

Did this answer your question?