Adding a Slack destination
There are two ways to configure Slack notifications:
The API approach is more complex to configure, but more flexible. In particular, it allows notifications to be sent to multiple Slack channels, whereas a Slack webhook is tied to a specific Slack channel.
If you are likely to configure multiple SquaredUp notification destinations to target different Slack channels, the API approach may be preferable. If you are only targeting a single Slack channel, the webhook approach should suffice.
Slack API
Generate an API Token
You will need to create a Slack app. Go to https://api.slack.com/apps and click on Create New App.
Select From scratch, specify a name for the app and the Slack workspace that hosts the Slack channels you want to send notifications to.
Configure the app icon and description. You can use whatever name, description and icon you would like, but it makes sense for them to refer to SquaredUp so that users can clearly see where the notifications are originating from.
- Select Add features and functionality and then choose the Permissions option.
- Configure the chat:write permission to Send messages as @squaredup_alerts.
- Configure the chat:write.public permission to Send messages to channels.
- Click Install to Workspace.
- You should now be given a token.
Adding a destination in SquaredUp
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.- Token:
Paste the API token in here. - Slack channel:
Enter the destination Slack channel for messages to be delivered to.You can specify public or private Slack channels, but for private channels the Slack app you created must be added to the Slack channel (type
/invite
in the Slack channel). Test:
Click to send a test notification and check that it is working as expected.In Slack, when you click the View button in the notification you may get a warning triangle beside it. To fix this, add
https://api.squaredup.com/api/slack_interaction
as the Interaction URL.
Slack Webhook
Generate a webhook URL
You will need to create a Slack app. Go to https://api.slack.com/apps and click on Create New App.
Select From scratch, specify a name for the app and the Slack workspace that hosts the Slack channels you want to send notifications to.
Configure the app icon and description. You can use whatever name, description and icon you would like, but it makes sense for them to refer to SquaredUp so that users can clearly see where the notifications are originating from.
- Go to Incoming Webhooks and enable the Activate Incoming Webhooks option.
- Click Add new Webhook to Workspace and choose the Slack channel you want to target.
- Copy the URL.
Adding a destination in SquaredUp
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.URL:
Paste the webhook URL to configure the destination in SquaredUp.Test:
Click to send a test notification and check that it is working as expected.In Slack, when you click the View button in the notification you may get a warning triangle beside it. To fix this, add
https://api.squaredup.com/api/slack_interaction
as the Interaction URL.