Skip to main content

LibreChat is joining ClickHouse. Learn more

LibreChat

Connect a Slack Workspace

Register your organization's Slack app in LibreChat, configure its callbacks and permissions, and install it in a workspace.

Organization workspaces let an administrator register a Slack app once, install it in your workspace, and let agent owners assign agents to it. This guide takes about 15 minutes and uses two browser tabs: Slack's app settings and LibreChat.

Before you start

Checklist

  • Your operator has deployed the shared gateway and it reports ready.
  • Your LibreChat account has the access:admin and manage:agents capabilities, for example through the ADMIN role.
  • You can create apps in the Slack workspace, or a Slack admin can approve the installation.

If the Slack row does not appear in Settings → Account, organization workspaces are not enabled on this deployment. Ask your operator, or use a manual connection instead.

1. Create the Slack app

Open Your Apps in Slack and select Create New App → From scratch. Name it, for example after your assistant, and pick the workspace to develop it in. You can also use an existing app that your organization controls.

If Slack shows the Pick features wizard, continue without selecting scopes or events, then select Create → Create Anyway. Do not install the app yet: LibreChat installs it for you in step 6.

2. Register the app in LibreChat

Open Settings → Account. In Connected accounts, find Slack and select Set up.

Slack row in Account settings with the description Connect agents to your Slack workspace and a Set up buttonSlack row in Account settings with the description Connect agents to your Slack workspace and a Set up button

The Manage Slack dialog opens. Select Add Slack app.

Manage Slack dialog showing No Slack apps yet and an Add Slack app buttonManage Slack dialog showing No Slack apps yet and an Add Slack app button

In Slack, open Basic Information → App Credentials. Select Show next to each secret, then copy the values into LibreChat:

Slack fieldLibreChat field
App IDSlack app ID
Client IDClient ID
Client SecretClient secret
Signing SecretSigning secret

Name is optional. It labels the app inside LibreChat and in the Agent Builder's bot picker; it does not rename the bot in Slack.

Add Slack app dialog with Name, Slack app ID, Client ID, Client secret and Signing secret fields, and Cancel and Save buttonsAdd Slack app dialog with Name, Slack app ID, Client ID, Client secret and Signing secret fields, and Cancel and Save buttons

Select Save. The app appears in the list with Add to workspace and a gear button for its connection settings.

Manage Slack dialog with the saved Acme Assistant app, an Add to workspace button, and a connection settings gearManage Slack dialog with the saved Acme Assistant app, an Add to workspace button, and a connection settings gear

The client secret and signing secret are encrypted in the LibreChat database. They are never shown again; leave a secret blank when editing the app to keep its saved value.

3. Configure the callback URLs

Slack needs three URLs: one to finish the installation, one to deliver events, and one for button clicks. Select the gear button, Connection settings, to see them for this app.

Connection settings dialog listing the OAuth redirect URL, Events URL and Interactivity URL, each with a copy buttonConnection settings dialog listing the OAuth redirect URL, Events URL and Interactivity URL, each with a copy button

Copy each one into the matching place in your Slack app:

LibreChat valueWhere it goes in Slack
OAuth redirect URLOAuth & Permissions → Redirect URLs. Select Add New Redirect URL, paste, then Save URLs.
Events URLEvent Subscriptions. Turn on Enable Events, paste it into Request URL, and wait for Verified.
Interactivity URLInteractivity & Shortcuts. Turn on Interactivity, paste it into Request URL, then Save Changes.

Make sure Socket Mode is off in Settings → Socket Mode. Organization workspaces always use HTTPS callbacks.

Copy the full URLs

The Events and Interactivity URLs end with your tenant and the app ID (for example /slack/events/_/A0123456789). Copy them exactly, including any base path. Slack can only verify the Events URL while the gateway is running and reachable from the internet.

4. Add bot permissions

In OAuth & Permissions → Scopes → Bot Token Scopes, add these seven scopes:

app_mentions:read
chat:write
reactions:read
reactions:write
files:write
im:write
im:history

Do not add user token scopes. LibreChat rejects an installation that is missing any of these bot scopes. The Slack overview explains what each one is for.

5. Subscribe to events and enable direct messages

In Event Subscriptions → Subscribe to bot events, add the following events, then select Save Changes:

  • app_mention
  • message.im
  • reaction_added
  • reaction_removed
  • app_uninstalled
  • tokens_revoked

In App Home → Show Tabs, turn on the Messages Tab and check Allow users to send Slash commands and messages from the messages tab. This lets people message the bot directly.

Leave token rotation off under OAuth & Permissions, and do not enable organization-wide installation. LibreChat does not support rotating tokens or Enterprise Grid organization-wide installs.

To show Slack's native agent status and Stop button as well, follow native agent sessions after this guide.

6. Install the app

Back in LibreChat's Manage Slack dialog, select Add to workspace. Slack's installation page opens in a new window, and LibreChat shows Connecting to Slack… with a Cancel button.

In Slack, choose the workspace and select Allow. Your workspace's app approval policy still applies, so a Slack admin may need to approve the request first.

When the window closes, the workspace appears under the app with a Connected badge.

Manage Slack dialog showing the Acme Inc workspace connected under the Acme Assistant app, with manage access, connection settings, reconnect and disconnect buttonsManage Slack dialog showing the Acme Inc workspace connected under the Acme Assistant app, with manage access, connection settings, reconnect and disconnect buttons

If the installation fails, LibreChat explains why. The most common causes are listed in Troubleshooting. Select Add to workspace again to retry, or Cancel to abandon a pending attempt.

Each registered app can be active in one workspace at a time. To connect a second workspace, create and register a second Slack app.

7. Grant bot management access

Agent owners who are not administrators need management access to the bot before they can assign their agents to it. Select the people icon, Manage access, on the workspace row, search for each person, and select Save.

Manage bot access dialog with Alex Morgan added as a bot managerManage bot access dialog with Alex Morgan added as a bot manager

Bot management does not grant permission to share agents, and people who only talk to the bot do not need it. See Security and permissions.

You are done. Back in Settings → Account, the Slack row now shows the number of connected workspaces.

Slack row in Account settings showing Connected workspaces: 1 and a Manage buttonSlack row in Account settings showing Connected workspaces: 1 and a Manage button

Next, assign an agent to the bot.

Manage apps and workspaces

All of these actions are in Settings → Account → Slack → Manage.

Removing the account that registered the app does not delete the organization's installation.

How is this guide?