Connect Slack to Managed Agents Limited availability
Connect Slack to Managed Agents to let your agents read Slack messages, search public channels, and look up users. You can also allow agents to send messages and add reactions.
Agents can access only the channels and direct messages that the Slack bot is a member of.
To get started, create or configure a Slack app and use its bot token to connect the integration in the Aiven Console.
Prerequisites
- Managed Agents enabled for your project. If you have not requested access or enabled Managed Agents, see Enable Managed Agents.
- A Slack workspace where you can create an app and install it, or request installation approval.
Create and configure a Slack app
-
Go to Slack API: Your Apps and create a Slack app or select an existing app.
-
Add the following Bot Token Scopes:
Scope Purpose channels:read,channels:historyList public channels and read their messages. groups:read,groups:historyList private channels and read their messages. im:read,im:historyAccess direct message conversations and read their messages. mpim:read,mpim:historyAccess group direct message conversations and read their messages. search:read.publicSearch public channel content. users:readLook up Slack users. canvases:readRead Slack canvases. For more information, see Slack OAuth scopes.
-
Optional: To allow your agent to send messages and add reactions, also add the following scopes:
Scope Purpose chat:writeSend messages. reactions:writeAdd reactions. -
Install the app to your Slack workspace and authorize the requested permissions. If installation requires approval, request it from your Slack workspace administrator.
If you change the scopes after installing the app, reinstall the app to authorize the updated permissions.
-
In your Slack app settings, open OAuth & Permissions and copy the Bot User OAuth Token (
xoxb-...).warningKeep your Slack token secure. Anyone with access to the token can access Slack resources with the permissions you granted to the app.
For more information, see Slack tokens.
Connect Slack to an agent
Before you start, have the bot token from your Slack app ready.
- In the Aiven Console, open your project.
- Select Agents, then select your agent.
- Select Integrations > Manage integrations.
- Under Integrations catalog, find Slack and select Connect to open the Connect Slack dialog.
- In the dialog:
- In Integration name, enter a name for the integration, such as
slack. - In Slack Bot / User Token, enter the bot token from your Slack app.
- Optional: To allow the agent to send messages and add reactions, turn off
Read-only access. This setting is on by default. The Slack app must
also have the
chat:writeandreactions:writescopes, respectively.
- In Integration name, enter a name for the integration, such as
- Select Connect.
- Close the Manage agent integrations dialog.
- On the agent's Integrations page, enable the Slack integration and select the tools the agent can use.
- Select Save changes.
The agent can now use the selected Slack tools, subject to the permissions granted to your Slack app.
Manage the Slack integration
To view or manage your Slack integration, open the agent's Integrations page and select Manage integrations.
If the integration shows Reconnect required, select reconnect and enter a valid Slack token to restore access.
To change which Slack tools an agent can use, update the tool selection on the Integrations page and select Save changes.
Related pages