> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/slack-connector-and-tool-setup.md).

# Slack connector and tool setup

The Slack connector lets workflows use Slack actions with an authorized workspace account or bot. Use it to retrieve Slack information or perform the operations enabled for your organization.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2F96Jy5UetYmMTu26rSs7m%2FG049A.mp4?alt=media&token=7e6b6fcb-a2f0-4e64-9799-f30c97cb67dd>" %}

## Before you start

For a custom OAuth connector, have permission to configure the Slack application and authorize it in the intended workspace.

## Choose Slack authentication

Open the Slack connector options and choose OAuth or a bot-token method.

![Slack connector authentication options](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/6F6uxyGP5RcTDQIea4pj/assets/g049a-g049a-01-methods.png)

Use the authentication method supported by the intended action and account model.

## Configure an OAuth connector

Start the organization OAuth connector and review its setup fields.

![OAuth connector configuration fields](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/JWROYNSjaodEzFU2rB11/assets/g049a-g049a-02-setup.png)

Identify the application credentials and scopes it requires before configuring Slack.

In the Slack application's OAuth settings, register the exact StackAI callback and required scopes.

![OAuth connector configuration fields](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/iWwgigG0Ek76n8560dol/assets/g049a-g049a-03-app.png)

The redirect and permission settings must match the connector's requirements.

Enter the Slack application credentials in the corresponding StackAI fields.

![OAuth connector configuration fields](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/EG6uyAzbrXp2UJHs6QgZ/assets/g049a-g049a-04-credentials.png)

Keep the client secret confidential when sharing configuration information.

## Authorize the Slack workspace

Create a workspace connection through the configured connector.

![Slack workspace authorization flow](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/QU0zV3MMWywWQp3NpMO5/assets/g049a-g049a-05-authorize.png)

Review the Slack authorization request for the intended workspace before accepting access.

## Use a bot-token connection when required

Use the bot-token connection form when the integration requires a bot account.

![Slack bot-token connection option](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/qxwVmpLRHwQRurZbcCK3/assets/g049a-g049a-06-bot-option.png)

OAuth and bot-token connections have different authorization requirements and are not interchangeable for every action.

## Configure and run a Slack action

Add List Users to the workflow and choose the intended Slack connection.

![Slack action inputs and results](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/csw5XJ0ORtF40Nm6Kpfi/assets/g049a-g049a-07-select.png)

This retrieves workspace users without posting a message.

Review the options for including deactivated users and bot users.

![Slack action inputs and results](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/JUdABtYet35RAMXt9HRN/assets/g049a-g049a-08-inputs.png)

These settings determine which accounts appear in the result.

Run the action and inspect the returned user records.

![Slack action inputs and results](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/aSnwxS5jCzDSlw2roaUV/assets/g049a-g049a-09-result.png)

Confirm that the response matches the workspace and filtering options you selected.

## Important behavior

OAuth and bot-token connections are not interchangeable for every Slack action. Check the action’s supported connection type.

The List Users options determine whether deactivated users and bot users appear in the result.

## Continue

* [Configure and test an action](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/configure-and-test-an-action.md)
* [Custom OAuth scopes and reauthorization](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/custom-oauth-scopes-and-reauthorization.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/slack-connector-and-tool-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
