> 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/integrations/catalog/slack/connect-slack-with-oauth.md).

# Connect Slack with OAuth

### Adding StackAI's App for Slack

The StackAI App for Slack can be added to both private and shared channels in your Slack workspace. Below, we'll guide you through the steps required:

#### Step 1: Select Slack (OAuth2) as a New Connection

![Connect Slack with OAuth setup](https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FioQQ3QaTBFUg6KWFOwta%2Fslack_oauth.gif?alt=media)

#### Step 2: Choose a Channel and Allow Access

You will see a pop-up window with StackAI requesting access.

![Connect Slack with OAuth setup](https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FGsE07Dm0CZhtq1rvuaSM%2Fslack_request_access.png?alt=media)

Select a channel to validate the connection. This is the channel your app will be able to post to. Your app will also inherit your user permissions and be able to read from all the channels you have access to.

#### Step 3: Ensure the Connection is Selected

You can test the connection to make sure you are connected using the "Test" button.

![Connect Slack with OAuth setup](https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FTqsqck3eX4UxEI1IEI5t%2Fconnect_to_slack.png?alt=media)

#### Step 4: Use Your Slack App

Select the actions you would like to use in Slack. To run the actions, make sure you have the parameters filled out.

![Connect Slack with OAuth setup](https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FObJVbJ0fZMlcdVGEHCdg%2Fslack_actions.png?alt=media)

***

## Connection fields and action reference

See [Slack](https://docs.stackai.com/integrations/catalog/slack.md) for the current connector fields and supported actions.


---

# 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/integrations/catalog/slack/connect-slack-with-oauth.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.
