# Slack

![Image 1 of 1](https://assets.relyanceuat.xyz/images/docs/34944743377933/34944743369869.png)
Slack is a cloud-based, real-time messaging, notification system, and workplace communication tool. It provides a unified space for messaging for teams and organizations, as well as a way for organizations to collaborate with each other.

In order to integrate Slack with Relyance AI you will need to follow an Oauth2 flow.

- The Slack integration scans, at most, 100 messages from each group/private message.
- The scan only scans messages from the last scan.

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** (bottom-left corner).
3. Select **Integrations**.
4. Search and locate the **Slack Technologies, LLC** integration card and click on it.
5. Click on the **Add Connection** button on the top right
6. Provide a meaningful name for the integration and click on the **Add** button
7. In the **Overview** section, select the integration features you wish to enable for the integration, review the **Scope and Permission**, and **Endpoint** details and click on **Continue**. For more details, see [Integration Features](/docs/introduction-to-relyance-ai/integration-features/)
8. In the **Connection** section, provide the appropriate values and click on **Continue**,

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34944743377933/34944743370509.png)
![Screenshot](https://assets.relyanceuat.xyz/images/docs/34944743377933/34944743372301.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34944743377933/34944736741901.png)

9. In the Authentication section, select **Oauth2/App Token**, then set the required options before clicking continue:
    - **Enable Admin User Scope (Required for DSR Delete)** — adds the
      `admin.users:write` user scope. Needed to fulfil DSR delete requests; leave
      it off for a read-only connection.
    - **Enable Team Logs Scope (Required for AI Discovery)** — adds the `admin`
      user scope, which is broad. Needed for AI Discovery over Slack; expect a
      security review to ask about this one specifically.
    - **Exclude archived channels** — checked by default; uncheck to include
      archived channels in scans. Behaviour only, no extra scope.
    - **Use Enterprise Workspace** — for a Slack Enterprise Grid organisation.
      Adds `team:read` and the `admin.teams:read` user scope, and needs Grid-level
      admin permissions.

    **These three checkboxes change what Relyance asks Slack for at
    authorisation time**, so they must be set *before* you authorise. Ticking one
    afterwards means going through the Slack authorisation again — the extra scope
    cannot be added to a grant that has already been issued.
10. If the Data Inspection check box is checked from step 7, In the Data Inspection section, provide the appropriate values and click on **Continue** **Minimum Confidence Level:** This property adjusts the sensitivity of the Data Inspection feature. Lower likelihoods (e.g., unlikely) offer more coverage but may produce false positives, while higher sensitivity (e.g., very likely) provides greater accuracy but less coverage.

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34944743377933/34944743374861.png)

11. Review the configuration summary from the Completion section and click on Finish.
12. Confirm the integration Status reflects Connected

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34944743377933/34944743375501.png)

### Verify the connection is really working

Two of the four checkboxes on the Authentication step are feature switches, and
leaving one off makes that feature silently return nothing:

| Checkbox | Grants | Without it |
| --- | --- | --- |
| **Enable Admin User Scope** | `admin.users:write` | data subject request *deletes* fail; discovery is unaffected |
| **Enable Team Logs Scope** | `admin.teams:read` and the `search:read` scopes | AI Discovery finds nothing |
| **Use Enterprise Workspace** | scopes the install at Enterprise Grid level | only the single workspace you installed into is scanned |
| **Exclude archived channels** | — | on by default, so archived channels are skipped |

1. **Connected but no channels or messages.** The install identity decides what is
   visible: Slack returns only the conversations that identity can see, so an app
   installed by a restricted user produces a partial picture that looks complete.
   Re-install as a workspace owner if the inventory is thinner than expected.
2. **AI Discovery or DSR deletes came back empty after you enabled the feature.**
   The corresponding checkbox is a *scope* change, so the connection has to be
   re-authorised — enabling the feature alone does not widen an existing grant.
3. **Only public channels appear.** Private channels, group DMs and DMs are covered
   by `groups:*`, `mpim:*` and `im:*`, which Slack grants only if the installing
   identity is a member. This is Slack's model, not a Relyance limit.
4. **An Enterprise Grid org scanned as one workspace.** **Use Enterprise Workspace**
   has to be set at connect time and needs org-level admin approval; it cannot be
   inferred from the token.

<!-- auth-methods:begin (generated from the integration catalog; do not hand-edit) -->

## Authentication methods and fields

Pick one of these under **Authentication Method** on the connection wizard's **Authentication** step. This table is generated from the integration catalog, so it always matches what the form actually asks for.

| Method | Required | Optional |
| --- | --- | --- |
| **Oauth2 / App Token** | `Enable Admin User Scope`, `Enable Team Logs Scope`, `Exclude archived channels`, `Use Enterprise Workspace` | — |

<!-- auth-methods:end -->

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

The **OAuth (browser authorization)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example slack/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
