Setting up Slack for connecting to Amazon Q - Amazon Q Business

Setting up Slack for connecting to Amazon Q

Before you connect Slack to Amazon Q, you need to create and retrieve the Slack credentials you will use to connect Slack to Amazon Q. You will also need to add any permissions needed by Slack to connect to Amazon Q.

The following procedure gives you an overview of how to configure Slack for connecting with Amazon Q.

Configuring Slack authentication for Amazon Q
  1. Log in to your Slack account and sign into your Slack workspace.

    Note

    To configure Slack for Amazon Q, you must be an admin user in the Slack account.

  2. From the workspace menu, select Tools and settings and then select Manage apps.

    Workspace menu expanded, showing Tools & settings and Manage apps options highlighted.
  3. From the Slack App Directory menu, select Build.

    Slack App Directory interface showing Installed Apps section with no apps found.
  4. On the Your Apps page, select Create an App.

    Slack API "Your Apps" page with options to create an app or generate tokens.
  5. On the Create an app page, select From scratch.

    Create an app dialog with "From scratch" option highlighted to configure app settings.
  6. In the Name app & choose workspace dialog box that opens, add an App name and Pick a workspace to deploy your app in. Then select Create App.

    Dialog box for naming an app and selecting a workspace, with fields and a Create App button.
  7. On the Basic Information page, from the Settings menu, select OAuth & Permissions.

    Slack API settings page with Basic Information selected and OAuth & Permissions highlighted.
  8. On the OAuth & Permissions page, go to Scopes, and then do the following based on whether you want to use a Bot Token to connect Slack to Amazon Q, or a User Token:

    Important

    If you use the bot token as part of your Slack credentials, you cannot index direct messages and group messages, and you must add the bot token to the channel you want to index. For information on Slack token types, see Token types in Slack API.

    • Add the following Bot Token Scopes:

      Bot Token Scopes interface showing no OAuth Scopes added and an "Add an OAuth Scope" button.
      • channels:history – View messages and other content in public channels that your app has been added to

      • channels:manage – Manage public channels that your app has been added to and create new ones

      • channels:read – View basic information about public channels in a workspace

      • conversations.connect:manage – Receive Slack Connect invite events sent to the channels your app is in

      • conversations.connect:read – Receive Slack Connect invite events sent to the channels your app is in

      • files:read – View files shared in channels and conversations that your app has been added to

      • groups:history – View messages and other content in private channels that your app has been added to

      • groups:read – View basic information about private channels that your app has been added to

      • im:history – View messages and other content in direct messages that your app has been added to

      • im:read – View basic information about direct messages that your app has been added to

      • mpim:history – View messages and other content in group direct messages that your app has been added to

      • mpim:read – View basic information about group direct messages that your app has been added to

      • reactions:read – View emoji reactions and their associated content in channels and conversations that your app has been added to

      • team:read – View the name, email domain, and icon for workspaces your app is connected to

      • usergroups:read – Create and manage user groups

      • users.profile:read – View profile details about people in a workspace

      • users:read – View people in a workspace

      • users:read.email – View email addresses of people in a workspace

    • Add the following User Token Scopes:

      User Token Scopes interface showing no OAuth Scopes added and an "Add an OAuth Scope" button.
      • channels:history – View messages and other content in a user’s public channels

      • channels:read – View basic information about public channels in a workspace

      • emoji:read – View custom emoji in a workspace

      • files:read – View files shared in channels and conversations that a user has access to

      • groups:history – View messages and other content in a user’s private channels

      • groups:read – View basic information about a user’s private channels

      • im:history – View messages and other content in a user’s direct messages

      • im:read – View basic information about a user’s direct messages

      • mpim:history – View messages and other content in a user’s group direct messages

      • mpim:read – View basic information about a user’s group direct messages

      • team:read – View the name, email domain, and icon for workspaces a user is connected to

      • users.profile:read – View profile details about people in a workspace

      • users:read.email – View email addresses of people in a workspace

      • users:read – View people in a workspace

  9. Then, scroll to OAuth Tokens for Your Workspace section, and choose Install to Workspace.

    OAuth Tokens section with explanation and Install to Workspace button.
  10. On the dialog box that opens up informing you that the app that you created is requesting permission to access the Slack workspace you wanted to connect it to, select Allow.

    Dialog box requesting permission to access Slack workspace, showing access details and Allow button.

    On successful completion, the console will display a OAuth Tokens for Your Workspace screen.

  11. From the OAuth Tokens for Your Workspace screen, copy and save the OAuth token you will use to connect to Amazon Q—either User OAuth Token or Bot User OAuth Token. You input this as Slack token when you connect to Amazon Q.

    OAuth token interface showing User and Bot User token fields with Copy buttons and access levels.
  12. Next, you retrieve your Slack team ID. You need this to connect to Amazon Q.

    From the Slack workspace menu, select Tools and settings and then select Manage apps. You'll find your team ID in the URL of the page that opens.

    Workspace menu expanded, showing Tools & settings and Manage apps options highlighted.
    Browser address bar showing a Slack app integration URL with a workspace ID highlighted.

You now have the Slack Team ID and Slack token you need to connect to Amazon Q.