Adding a Slack destination
There are two ways to configure Slack destinations:
The email destination type lets one or more email addresses.
The API approach is more complex to configure, but more flexible. In particular, it allows you to send notifications or schedule sharing to multiple Slack channels, whereas a Slack webhook is tied to a specific Slack channel.
If you are likely to configure multiple SquaredUp 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 an App.
Select From scratch, specify a name for the app and the Slack workspace that hosts the Slack channels you want to send 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 messages are originating from.
- Navigate to Features > OAuth & Permissions from the left-hand pane.
- 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
Add a new notification destination by doing one of the following:
- Navigate to Monitors and click Add notification rule.
- Navigate to Settings > Notifications and click Add destination.
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.NoteYou can specify public or private Slack channels, but for private channels the Slack app you created must be added to the Slack channel (type
/invitein the Slack channel). Test:
Click to send a test message and check that it is working as expected.NoteIn 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_interactionas the Interaction URL.In SquaredUp Add a notification rule to configure when a notification should be sent, and select this destination. For Scheduled sharing select this destination on the Destination tab.
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 an App.
Select From scratch, specify a name for the app and the Slack workspace that hosts the Slack channels you want to send 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 messages 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.
- Select the Channel for webhook.
- Click Install {webhookName}.
- Copy the Webhook URL.
Adding a destination in SquaredUp
Add a new notification destination by doing one of the following:
- Navigate to Monitors and click Add notification rule.
- Navigate to Settings > Notifications and click Add destination.
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.Query parameters:
to include additional
Click Add query parameterkey:valuepairs in your request URL. Each parameter is appended to the query string when the request is sent.Toggle encryption for a parameter value using the encrypt icons
/ next to it.Test:
Click to send a test message and check that it is working as expected.NoteIn 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_interactionas the Interaction URL.In SquaredUp Add a notification rule to configure when a notification should be sent, and select this destination. For Scheduled sharing select this destination on the Destination tab.