Skip to main content

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​

  1. Go to Slack API: Your Apps and create a Slack app or select an existing app.

  2. Add the following Bot Token Scopes:

    ScopePurpose
    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.

  3. Optional: To allow your agent to send messages and add reactions, also add the following scopes:

    ScopePurpose
    chat:writeSend messages.
    reactions:writeAdd reactions.
  4. 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.

  5. In your Slack app settings, open OAuth & Permissions and copy the Bot User OAuth Token (xoxb-...).

    warning

    Keep 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.

  1. In the Aiven Console, open your project.
  2. Select Agents, then select your agent.
  3. Select Integrations > Manage integrations.
  4. Under Integrations catalog, find Slack and select Connect to open the Connect Slack dialog.
  5. In the dialog:
    1. In Integration name, enter a name for the integration, such as slack.
    2. In Slack Bot / User Token, enter the bot token from your Slack app.
    3. 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:write and reactions:write scopes, respectively.
  6. Select Connect.
  7. Close the Manage agent integrations dialog.
  8. On the agent's Integrations page, enable the Slack integration and select the tools the agent can use.
  9. 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