Slack is a web-based tool that enables you to structure your team’s communications. It can help you organize your communication flow by dividing it into different channels, which may be open for any of your colleagues to join, irrelevant of their role in the company, or private for sensitive information, which are invisible to all, except those invited. The tool also allows you to send direct messages to other users within the account.
One of the great things about Slack is that it can be integrated with a wide variety of tools, including Businessmap.
The main benefit that comes from connecting the two is that all of your activity in Businessmap can be sent automatically to your chosen channel in Slack. It will appear in the form of a text-based message in the selected channel or Slack user and will include different types of information depending on the Business Rule you choose for your integration.
Setting up the integration is easy and takes no more than a couple of minutes.
The integration is implemented via Business Rules and Incoming Webhooks. If you’re not sure whether your team is using Business Rules yet, learn more about this feature here.
This article aims to guide you through the process of creating a new app in Slack for which you can enable an Incoming Webhook and then 'call' this webhook URL from a business rule in Businessmap.
1. Log in to your Slack workspace, open the API page at https://api.slack.com and click on the 'Create an app' option.
2. Select the 'from scratch' option to create a new app from scratch.
3. Give a name for your new app (e.g. Businessmap) and select the workspace for which you would like to create the app.
4. After creating the new app, you will be redirected to that page's settings page. From the top left corner, you can switch between different apps you might have in your Slack workspace. Expand the 'Add features and functionality' section of the newly created app and select the 'Incoming Webhooks' option.
5. Click on the toggle button to activate the incoming webhooks functionality and click on the 'Add New Webhook to Workspace' button to create a new webhook.
6. The next page would prompt you to grant access to the newly created app to a particular channel in your Slack workspace.
Select the appropriate channel and click on 'Allow'.
7. After access has been granted, you should get redirected back to your app's home page and the newly created webhook should be visible at the bottom of the Incoming Webhooks section, as shown below:
8. Copy the webhook URL and you are ready to configure the business rule in Businessmap using this URL.
9. In Businessmap, click on the gear icon to open Account Administration, select 'Business Rules' and choose a rule that has the 'invoke web service' action available e.g. 'Card is created', 'Card is updated', 'Card is moved'. More information on all business rules in Businessmap can be found here.
10. Configure the business rule trigger according to your use case and needs. In the below example, the trigger is a change in the priority to Critical so whenever this happens, a custom message will be sent to the Slack channel.
11. Service Invoke Settings
- Name: the name is just for your own convenience e.g. “Post to channel X in Slack”
- URL: here you need to paste the webhook URL that you copied from Slack in step 8
- Method: should be set to POST.
- Authentication: None
- Send the parameters in the body of the web service call should be enabled.
- Parameters: for the first parameters, use the 'text' one which should be specified in the left parameter box, and then input the information you would like to receive directly in the Slack channel. Note that you can use the system properties (e.g. card ID, title, priority, etc.) that are available when you click on the green + button so you will be able to push information dynamically for the different cards that trigger the rule.
The custom text that is used in the below example is:
[Title][CardID] priority was set to [priority] by [author] at [last modified] GMT where the words in brackets are added as dynamic parameters using the + button.
Tip: for a parameter, you can also use 'channel' and specify a particular channel in Slack where the message should be posted. If the channel is not specified as a parameter, the message will be sent to the channel configured in step 6 above.
If you want to perform a mention in Slack, you would need to include @username in the notification message.
Slack mentions will work only if you have the same usernames in both Slack and Businessmap.
If you would like to send different text messages to your Slack channel when a given rule is executed, you would need more business rules to cover all scenarios.
12. When you are done customizing the service with the parameters relevant to your work, click on 'Test Settings' to make sure everything is working correctly. If you receive 'OK' as a result of your test, you are ready to save the rule and finish the process.
*If your test function comes up with an error message, make sure you double-check that you have ticked off the “Send the parameters in the body of the web service call” option.
When the rule has been triggered, the custom message should look like this:
The above guide features the 'Card is updated' business rule but you can use another rule that has the 'invoke web service' action. Such a rule can be the 'Card is moved' and it can be used to update the channel members about any movement of cards on a given board.
If you have any problems with the process of integration, do not hesitate to contact our support team. They will be happy to assist you in solving any issues you might come up against.