> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.alephant.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.alephant.io/_mcp/server.

# Slack

> Configure Slack channel and thread indexing with the authentication and access model your deployment supports.

## What it indexes

The Slack connector indexes message threads from non-archived public channels and private channels that the Slack bot can access. A root message and its replies become one searchable document. Direct messages are not part of the connector's channel crawl.

By default, bot and app messages are filtered out. You can include them when automated feeds are useful. You can also limit channels by exact lowercase names or full-match regular expressions, then apply a separate exclusion list after the include filter.

| Setting                      | Indexing effect                                                                                                       |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Channels                     | Leave empty to consider every accessible public or private channel, or enter exact channel names to narrow the crawl. |
| Enable Channel Regex         | Treats each Channels value as a full-match regular expression.                                                        |
| Channels to Exclude          | Removes exact channel names after the include filter.                                                                 |
| Enable Exclude Channel Regex | Treats each exclusion as a full-match regular expression.                                                             |
| Include Bot Messages         | Includes bot and app messages that are skipped by default.                                                            |

## Prerequisites

* An OpenCore Admin must be able to create a credential and connector.
* Install a Slack app in the workspace and make sure its bot can see every channel you intend to index. Add the bot to private channels explicitly.
* The built-in OAuth flow requests channel history/read, private-channel history/read, channel join, user and email read, user-group read, and IM history scopes. It does not request `team:read`. A normal single-workspace installation can use this built-in OAuth flow; the indexed connector still crawls public and private channels, not direct messages.
* Enterprise Grid validation calls `auth.teams.list`. The current built-in OAuth does not request `team:read`, so Grid deployments must use a manual Bot Token with `team:read` unless the deployment has explicitly extended the built-in OAuth scope.
* Built-in OAuth requires `OAUTH_SLACK_CLIENT_ID`, `OAUTH_SLACK_CLIENT_SECRET`, a correct `WEB_DOMAIN`, and the deployment's OAuth state store. If those are unavailable, create a bot-token credential manually.

## Credentials

| Method      | OpenCore credential values           | Notes                                                                                                                                                                                                                                       |
| ----------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Slack OAuth | No token is pasted into the form.    | Available only when the deployment enables Slack OAuth and its client environment is configured. Suitable for a normal workspace; Enterprise Grid requires a deployment-extended `team:read` scope. OpenCore stores the returned bot token. |
| Bot token   | `slack_bot_token: <SLACK_BOT_TOKEN>` | Use a bot token from the approved Slack app. For Enterprise Grid, include `team:read`. Never paste a user token or a production token into documentation or support messages.                                                               |

OAuth is implemented for Slack. OAuth availability in the Admin UI is deployment-dependent. For Enterprise Grid, use the manual Bot Token path unless your deployment has extended the built-in OAuth request to include `team:read`.

## Configure in OpenCore

1. In the Admin panel, open **Connectors**, choose **Slack**, and create or select the Slack credential. Use built-in OAuth for a normal workspace; for Enterprise Grid, use a manual Bot Token with `team:read` unless OAuth was extended by the deployment.
2. Enter an optional channel include list. Channel names are normalized to lowercase.
3. Enable include regex only when every value is a valid full-match pattern.
4. Add exact or regex exclusions for channels that must never be indexed.
5. Decide whether bot and app messages should be included.
6. Choose the document access mode your deployment exposes, set refresh and pruning options, and create the connector.
7. Run the initial index attempt before attaching the resulting document set to an Agent.

## Permissions

Slack source-permission sync is a conditional deployment capability. When **Auto Sync Permissions** is available and selected, OpenCore resolves channel access and stores source access for indexed threads. Private channels are restricted to resolved members.

For an Enterprise Grid public channel, OpenCore restricts access to the resolved union of users in its workspaces only when the workspace/team mapping is known and non-empty and that union has no more than 5,000 entries. If the mapping is unknown or empty, the channel's workspace is absent from the mapping, or the user union exceeds the 5,000-entry implementation limit, permission sync fails open for that public channel and stores it as OpenCore Public. Every OpenCore user can then search it, which can be broader than Slack workspace membership. This fallback applies to public channels only; it does not turn private channels Public.

When source-permission sync is not available or is not selected, Slack channel membership is not enforced automatically in search. Use the OpenCore **Private** access mode with explicitly assigned user groups for restricted content, or **Public** only when every OpenCore account may see all indexed Slack content.

## Verify

1. Confirm credential validation can authenticate and list at least one public channel.
2. Start an index attempt and verify it finishes without `invalid_auth`, `not_authed`, `token_revoked`, or `missing_scope` errors.
3. Search for a recent root message and a reply from an included channel.
4. Confirm excluded channels and default-filtered bot messages do not appear.
5. If Auto Sync Permissions is selected, test with one user who can access a private channel and one who cannot.
6. On Enterprise Grid, also test a public channel with an OpenCore user outside every Slack workspace where the channel is shared. If that user can search it, treat the channel as fail-open OpenCore Public and verify that every OpenCore user is permitted to see its contents before release.

## Troubleshooting

| Symptom                                                   | Check                                                                                                                                                                                                                         |
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `missing_scope` while listing channels or validating Grid | Grant the app the required public/private channel read scopes. For Enterprise Grid, use a manual Bot Token with `team:read` unless the deployment extended the built-in OAuth scope.                                          |
| A private channel is missing                              | Add the Slack bot to that channel and confirm it is not excluded by an exact or regex filter.                                                                                                                                 |
| No bot-generated content appears                          | Enable **Include Bot Messages**; it is off by default.                                                                                                                                                                        |
| A regex rejects connector creation                        | Fix the invalid pattern. Include and exclusion regexes use full-match semantics.                                                                                                                                              |
| OAuth fails or the button is absent                       | Verify the Slack OAuth client values, public callback domain, and OAuth state store; otherwise use a manual bot token.                                                                                                        |
| A Grid public channel is visible outside its workspace    | Check whether workspace/team discovery or user enumeration failed, the channel maps to no known workspace, or the resolved union exceeds 5,000 entries. Any of these conditions can make that public channel OpenCore Public. |

## Related pages

* [Connectors & Indexing](/opencore/knowledge/connectors)
* [Index Settings](/opencore/knowledge/index-settings)