Sending Notifications to a Slack Channel
Context
If you and your team use Slack for communications, MSP Process can alert you when an event occurs by sending notifications to a Slack channel. Examples of this include:
- Putting a message in a Slack channel when a critical priority ticket is logged in your PSA
- Putting a message in a Slack channel when one of the platforms you use to power your business (for example, your Backup solution) logs a failure
Creating the Slack App
- Login to the Slack API site (https://api.slack.com/apps)
- Click the Create an App button
- Choose the From a manifest option
- Choose which workspace you'd like to develop the app in; click Next to move to the next step:
- When prompted to insert a manifest, click on the YAML tab
- Enter the following text into the YAML tab
- _metadata: major_version: 1 minor_version: 1 display_information: name: MSPProcess features: bot_user: display_name: MSPProcess always_online: false oauth_config: scopes: bot: - incoming-webhook settings: org_deploy_enabled: false socket_mode_enabled: false token_rotation_enabled: false
- Click Next
- Click Create to finish creating the app
Customizing the Icon of the Slack App
By default, any new Slack app uses a default icon. You'll likely want to customize that icon, so that it's easier to see when MSP Process has posted to your Slack channel.
- In the https://api.slack.com/apps website, edit the MSP Process app that you just created
- Navigate to Settings -> Basic Information
- At the bottom of the page, in the Display Information section, upload the logo below into App Icon & Preview.
- Click the Save Changes button when ready
Creating a Webhook in Slack for MSP Process to Use
- In the https://api.slack.com/apps website, edit the MSP Process app that you just created
- Navigate to Features -> Incoming Webhooks
- At the bottom of the page, click the Add New Webhook button
- When prompted, choose which Slack channel this webhook will post into
- Once you've saved that webhook, copy it into your clipboard; you'll need it for the next step
Configuring a Notification To Send Messages to a Slack Channel
- Login to MSP Process
- Open the Notifications module
- Click the Create button to add a new Notification
- Configure the Notification as needed:
- Give it a Name
- Select which Data View it should use (for example, an App Bot or a Webhook)
- Enable the Slack output by clicking on it, and then configure the Slack settings by clicking the gear icon
- Configure how MSP Process will send messages into your Slack channel by doing the following:
- Provide the webhook URL from the previous section
- Configure what the payload of the message will be - note that you can use variables to insert dynamic data from the Data View
- Click Test to ensure that MSP Process is able to communicate with Slack; you'll see a "Hello, world" test message show up in the Slack channel
- Click Update to save the Slack configuration in MSP Process
- Click Create to save the Notification in MSP Process
Congratulations! You've now configured MSP Process to send a message to a Slack channel.