Connect Slack
Connect a Slack app to the Slack messaging account so people can talk to Sofi from Slack.
Connect Slack when people in your Slack workspace should reach Sofi from direct messages, group messages and channels. This task is for administrators of both Servicely and the Slack workspace.
Before you begin
- You need the
administratorrole in Servicely. - Switch to the Administration workspace with the Workspace selector at the foot of the menu.
- The Slack Integration application is installed. It adds an inactive messaging account named “Slack” and an outbound token named “Slack bot token”. See Applications.
- You can create and install apps in the Slack workspace.
- At least one AI assistant lists Slack, or All, in Channels. See AI assistants.
Steps
-
In Slack, create an app for your workspace on the Your Apps page.
-
In Slack, open the app’s OAuth & Permissions page and add these scopes under Bot Token Scopes.
Scopes Used to chat:write,im:write,mpim:writeSend replies. im:history,mpim:historyRead direct and group messages. app_mentions:read,channels:history,groups:historyRead mentions and thread replies in channels. users:read,users:read.emailMatch the Slack user to a Servicely user. commandsReceive the slash commands. -
In Slack, open Basic Information and copy the Signing Secret.
-
In Servicely, go to Messaging & notifications → Accounts & channels → Messaging accounts.

The Messaging accounts item in the Messaging & notifications menu. -
Open the “Slack” account. Paste the signing secret into App secret and set Active to Yes. Outbound API token already holds “Slack bot token”.

The default Slack messaging account, with the Slack bot token in Outbound API token, App secret under App Registration, and Copy endpoint URL. -
Select Copy endpoint URL. It saves the account and copies the events endpoint to the clipboard.
-
In Slack, turn on Event Subscriptions and paste the events endpoint into Request URL. Under Subscribe to bot events, add
app_mention,message.im,message.mpim,message.channelsandmessage.groups. -
In Slack, turn on Interactivity & Shortcuts. In its Request URL, enter the events endpoint followed by
/interactivity. -
In Slack, install the app to the workspace and copy the Bot User OAuth Token, which starts with
xoxb-. -
In Servicely, go to Integrations → API access → System API outbound tokens and open “Slack bot token”.
-
Paste the bot token into Access Key / Token and select Save & stay.

The Slack bot token record, with the empty Access Key / Token field. -
Select Test Connection. It shows whether the bot token reaches Slack.
Result
A direct message to the Slack app reaches Sofi, and the reply comes back in the same conversation. Sofi answers as the Servicely user who matches the Slack user, and tells an unmatched user that their account is not recognised. In a channel, people mention the app to start a thread. The first mention in a channel adds it to Messaging & notifications → Accounts & channels → Channel Subscriptions for an administrator to approve.
Options
| To | Do this |
|---|---|
| Let people start a new conversation with a slash command | In Slack, create the commands /newchat, /clear and /endchat under Slash Commands. For each Request URL, enter the events endpoint followed by /commands. Typing one of them as a message works without this. |
| Match Slack users by email address | Leave Email Fallback Enabled at Yes under Identity Matching. When no user holds the Slack user’s ID in Slack ID, Servicely matches by email address. |
| Stop storing the matched Slack identity | Set Persist Matched Identity to No. At Yes, Servicely stores the Slack identity on the user after an email match, so later messages match directly. |
| Replace the signing secret | After you regenerate it in Slack, paste the new value into App secret. Servicely rejects every request that is not signed with the current secret. |