How to set up the Slack event channel
Category: Integration Setup
Create an Incoming Webhook for Slack
- Visit the Incoming Webhooks page in the Slack App Directory.
- Click Add Configuration.
- Choose the channel your Incoming Webhook will post messages to. Note: you can later override this webhook default channel with additional configuration in Sapho.
- Click Add Incoming Webhooks Integration.
- Copy the Webhook URL and paste it in a secure place for later reference.
- Scroll to the bottom of the page and click Save Settings.
Obtain an OAuth Access Token
Follow this step only if you would like to @mention users in the messages Sapho will send to Slack. Otherwise, proceed with configuring the Slack Global Settings in Sapho.
- Visit Your Apps page in the Slack App Directory.
- Click Create an App.
- Enter Sapho in the App Name field.
- Choose the Slack workspace where the notifications from Sapho will be posted.
- Click Create App.
- Go to OAuth & Permissions page under Features.
- Select the following permission scopes: users:read and users:read.email.
- Click Save Changes.
- At the top of the page, click Install App to Workspace.
- Click Authorize.
- Copy the OAuth Access Token and paste it in a secure place for later reference.
Configure Slack Global Settings in Sapho
- Go to the detail page of the event whose notifications you want to deliver via Slack.
- Click on the Slack tile.
- Go to the Global Slack Settings tab.
- Paste the webhook URL obtained earlier in the Slack Webhook URL field.
- (Optional) Enter the username that Sapho will post as in the Bot User Name field. The default is SaphoBot.
- (Optional) Enter the URL of the icon that will be used for the user that Sapho will post as in the Bot Icon URL field. If you leave this field empty, the bot will use the default Sapho icon.
- (Mandatory only for user mentions) Enter the OAutg Access Token obtained earlier in the Bot User OAuth Access Token field.
- (Optional) Enter the name of a valid channel which will override the channel you chose when creating the webhook in the Slack App Directory.
Set up the Slack event channel in Sapho
- Return to the Message Editor tab and configure your notification.
- (Optional) Add a variable from the record which will trigger the event by clicking the Insert variable button. Note: if you would like to @mention a user in the message, so the user is alerted to an event or to an action they need to take, then add the Slack User format to the variable which contains the email of the intended user.
- Toggle the switch on to enable the Slack channel.
- Click Send Test to send a notification to the chosen Slack channel to test whether everything works correctly.