Skip to main content

Connect to Slack

Slack is a messaging platform for teams. Connect Slack to Retool to send notifications, manage channels and users, and build internal tools that keep teams informed.

What you can do with Slack in Retool

After you create a Slack resource in Retool, you can:

  • Send messages to channels, threads, and direct messages.
  • List and manage channels, members, and user profiles.
  • Upload and share files.
  • Automate notifications from apps, workflows, and agents.

Before you begin

To connect Slack to Retool, you need the following:

  • Slack app: A custom Slack app created in the Slack API dashboard with a Client ID and Client Secret. Self-hosted instances can't use Retool's hosted OAuth app.
  • OAuth redirect URL: Your Retool instance's OAuth callback URL configured in the Slack app's settings.
  • Retool permissions: Ability to create and manage resources in your organization.

Create a Slack resource

Follow these steps to create a Slack resource in Retool.

1. Create a new resource

In your Retool organization, navigate to Resources in the main navigation and click Create newResource. Search for Slack and click the Slack tile to begin configuration.

2. Configure general settings

Specify a name and description for the resource that indicates which Slack workspace it connects to. The description provides more context to users and Assist about how to use the resource.

Slack resource configuration form.

Resource name and description

Choose a name and description that indicate which Slack workspace the resource connects to.

Example nameExample description
Slack notificationsSends alerts and notifications to the #ops-alerts channel.
Slack support workspaceConnects to the support team's Slack workspace for ticket updates.
Slack workspace-level access

Connecting Slack authorizes Retool to act on behalf of an entire Slack workspace, not an individual user's account. You typically only need one Slack resource per workspace. Enable the Share credentials between users option (described below) so every Retool user can use the same connection, rather than requiring each person to authorize individually.

3. Configure resource credentials

Configure the following settings for your Slack resource.

Scopes

Select the Slack bot token scopes that Retool requests when connecting to your workspace. Scopes control which actions and data the connection can access, such as reading channels or posting messages.

Examples
channels:read
chat:write
users:read
Caution

If you change scopes after connecting, you must reconnect with OAuth for the scope change to take effect.

4. Configure authentication

Slack uses OAuth 2.0 to authorize Retool to access your workspace.

Self-hosted instances must create a custom Slack app.

  1. Create an app in the Slack API dashboard and add the same bot token scopes you selected in the previous step, under OAuth & Permissions.
  2. Copy the OAuth callback URL described in the resource configuration form and add it as a redirect URL under OAuth & Permissions in your Slack app.
  3. From the Slack app's Basic Information page, copy the Client ID and Client Secret into the corresponding fields in Retool.
  4. Click Connect with OAuth to authorize the connection. After you authorize, Retool displays a Connected status.
Example values
Client ID: 1234567890123.1234567890123
Client Secret: ••••••••••••••••••••••••••••••••

Enable Share credentials between users so all Retool users can use the same connection instead of each person authorizing individually.

5. Configure advanced options

Outbound region

If your organization uses outbound regions, select the region that should be used for requests to Slack. This controls which geographic region your requests originate from.

6. Verify the connection

Slack resources don't include a Test connection button. To confirm your resource is configured correctly, connect with OAuth and check that Retool displays a Connected status, or save the resource and run a simple query, such as listing channels, to confirm access.

7. Save the resource

Click Create resource to save your Slack resource. You can now use it in queries across your Retool apps, workflows, and agent tools.

Interact with Slack data

Once you've created a Slack resource, you can interact with Slack data using Retool.

Switch to the new app builder

Retool recommends using the new app builder so you can use natural language to build React-based apps using AI.

Best practices

Follow these best practices to maintain the security of your Slack resource.

  • Grant only the scopes you need: Select only the bot token scopes required for your use cases to limit the impact of a compromised connection.
  • Use shared credentials deliberately: Enable Share credentials between users only when you want every Retool user to act as the same Slack connection. Otherwise, each user must authorize individually.
  • Rotate credentials regularly: If you use a custom Slack app on self-hosted instances, follow Slack's recommendations for rotating your Client Secret.
  • Use resource environments: Organizations on an Enterprise plan can configure multiple resource environments to connect different Slack workspaces for production, staging, and development.
  • Store query-level secrets in configuration variables: If a query needs a value like a webhook URL or channel ID that shouldn't be hardcoded, store it in a configuration variable rather than embedding it directly in the query.