> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcollate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack Integration with Collate for Data Collaboration

> Integrate Collate with Slack to enable real-time data collaboration, search assets, receive notifications, and share metadata insights directly in Slack.

# Slack Application in Collate

<div className="collate-ai-iframe">
  <iframe width="800" height="450" src="https://www.youtube.com/embed/2f5R13Jf78Q" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
</div>

Integrate Collate with Slack to enhance data collaboration and streamline team workflows. This integration enables real-time notifications, in-Slack search and sharing of metadata assets, and message interactions—all within your existing Slack workspace.

## Overview

The Slack application connects your Slack workspace with Collate, enabling seamless communication and metadata access:

* **Real-Time Notifications**: Receive instant alerts, mentions, and updates directly in Slack.
* **Metadata Search**: Quickly search for glossaries, terms, tags, and tables within Slack.
* **Asset Sharing**: Share Collate assets effortlessly with your team from Slack.
* **Enhanced Productivity**: Stay informed and connected without leaving your workspace.

## Key Capabilities

* **Search Entities**: Use Slack to search glossaries, terms, tags, and tables.
* **Share Assets**: Share metadata assets from Collate to your team directly in Slack.
* **Notifications**: Get notified when someone mentions `@<Bot-Name>`, or when updates occur in your data workspace.

## Using Collate in Slack

<iframe width="800" height="450" src="https://www.youtube.com/embed/F7wMv8-BEXw?si=1ORlwm6HXHbo88jW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

Once the app is installed, users need to invite it to their channel before they can interact with it.

### Step 1: Invite the App to a Channel

There are two ways to invite the AskCollate to a channel:

**Option A — From channel settings:**

1. Open the channel in Slack.
2. Click the channel name at the top to open **Channel Settings**.
3. Go to the **Integrations** tab → **Add an App**.
4. Search for your AskCollate and click **Add**.

**Option B — Via slash command:**

In any channel, type:

```
/invite @AskCollate
```

Replace `@AskCollate` with the name you gave your Slack app during setup.

### Step 2: Start Asking Questions

Once the app is in your channel, mention it with a natural language query:

```
@AskCollate tell me the assets within bigquery service
```

```
@AskCollate show tables owned by the marketing team
```

```
@AskCollate what are the Tier 1 assets in the warehouse?
```

Collate AI will respond directly in the channel with relevant metadata from your data platform.

<Tip>
  You can also interact with the AskCollate in **Direct Messages** — no channel invite needed.
</Tip>

## Authorizations

When connected, Collate will have the following permissions in Slack:

* View and respond to messages that mention `@<Bot-Name>`.
* Access content in public channels where Collate is added.
* Join public channels and view their basic information.
* Access content in direct messages and group direct messages.
* View user profiles in the workspace.
* Send messages as `@<Bot-Name>`, including to channels it's not a member of.
* Post messages to designated Slack channels.

## Slack App Configuration

To enable Slack integration in Collate:

1. Navigate to **Settings** → **Applications** → **Add Apps**.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack1.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=5c1acd4ccc57976560a10437f7cc635a" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack1.png" />

2. Search for **Slack** and install the application.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack2.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=c6c01b95721ab77628b97ba5896c63fe" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack2.png" />

### Configuration Fields

* **Client ID**: Identifies your Slack app. Required to initiate OAuth flows.
* **Client Secret**: Authenticates OAuth requests made by your app.
* **Signing Secret**: Verifies that incoming requests originate from Slack.
* **User Token**: Authenticates Slack API requests on behalf of a user (starts with `xoxp-`).
* **Bot Token**: Authenticates Slack API requests on behalf of the bot (starts with `xoxb-`).

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack3.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=9189413230195238443a85022ebc6b6e" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack3.png" />

<Tip>
  Store all five credentials securely. Enter them in Collate via **Settings → Applications -> Slack Application** — do not share tokens directly.
</Tip>

## How to Obtain Slack Credentials

To integrate Slack with Collate, you need to generate a **Bot Token**, **User Token**, **Client ID**, **Client Secret**, and **Signing Secret** from your Slack workspace.

### Create a Slack App

1. Go to the [Slack API: Your Apps](https://api.slack.com/apps) page.
2. Click **Create New App**.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack4.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=d570811388bab308fc17531015b3d277" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack4.png" />

3. Select **From scratch**.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack5.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=843c1202303eda0596843ebc55eb2374" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack5.png" />

4. Enter the **App Name** (e.g., `AskCollate`) and choose your **Slack workspace**.
5. Click **Create App**.

<img noZoom src="https://mintcdn.com/collatedocs/pwDK17HN40l-AOvR/public/images/applications/slack6.png?fit=max&auto=format&n=pwDK17HN40l-AOvR&q=85&s=f3c35b31b38daa60157d964bea6d00db" alt="Configuration" width="1080" height="1114" data-path="public/images/applications/slack6.png" />

6. After your app is created, you'll be redirected to the Basic Information page under Settings.
   Here, you'll find the following important credentials:

* Client ID – Used to identify your app.
* Client Secret – Used for authenticating requests made from your app.
* Signing Secret – Used to verify that incoming requests (e.g., from Slack) are genuinely from Slack.

  Click **Show** next to each secret to view the values. You can regenerate them using the **Regenerate** button if needed. Once you have all credentials, enter them in Collate via **Settings → Applications**.

Make sure to store these securely, as you'll need them to configure OAuth and validate request signatures later.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack-basic.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=a916e285218413301de4ebd8b93cb584" alt="Basic Information page" width="1428" height="596" data-path="public/images/applications/slack-basic.png" />

### Configure OAuth & Permissions

1. In your app’s dashboard, navigate to **OAuth & Permissions**.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack7.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=4c7400995ae728b96e2a116b47a5d5b4" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack7.png" />

2. Under **Scopes**, configure the following:

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack8.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=e6a3955313eac2bd55cf4bb432f876a5" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack8.png" />

#### For **Bot Token Scopes**:

Add these scopes:

* `app_mentions:read`
* `channels:read`
* `chat:write`
* `commands`
* `groups:read`
* `im:history`
* `im:read`
* `mpim:history`
* `mpim:read`
* `users:read`
* `users:read.email`

#### For **User Token Scopes**:

Add these scopes:

* `channels:history`
* `groups:history`
* `im:history`
* `mpim:history`

<Tip>
  Only add the scopes you need. Ensure your Slack workspace allows user token generation (may require admin privileges).
</Tip>

### Configure Redirect URLs

Before installing the app to your workspace, configure the redirect URLs to ensure successful OAuth authentication:

1. In the left-hand menu, go to **OAuth & Permissions**.
2. Scroll down to the **Redirect URLs** section.
3. Click **Add New Redirect URL** and enter the redirect URL (e.g., `https://&lt;your-instance-url&gt;.getcollate.io/api/slack/callback`).
4. Click **Save URLs** to apply the changes.

The redirect URL must exactly match the URL used in your OAuth request.
This ensures Slack can return the authorization code to your backend after the user grants permissions.

<img noZoom src="https://mintcdn.com/collatedocs/pwDK17HN40l-AOvR/public/images/applications/slack-redirect.png?fit=max&auto=format&n=pwDK17HN40l-AOvR&q=85&s=cb931e1ced331e7a6e5dd4a6e6c06acd" alt="Configure Redirect URLs" width="1514" height="486" data-path="public/images/applications/slack-redirect.png" />

### Configure Event Subscriptions

After setting the necessary OAuth scopes, follow the steps below to configure **Event Subscriptions**:

1. In the left-hand menu under Features, click on Event Subscriptions.

2. Toggle the Enable Events switch to On.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/enable-events.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=343d8c35668f528e2c6c6a11cbe50f99" alt="Enable Events" width="2102" height="1248" data-path="public/images/applications/enable-events.png" />

3. In the Request URL field, enter your app’s endpoint (e.g., `https://&lt;your-instance-url&gt;.getcollate.io/api/slack/events`).

   * Slack will send a verification request containing a challenge parameter.
   * Ensure your endpoint responds with the challenge value to confirm validation.

4. Scroll down to the Subscribe to bot events section and click **Add Bot User Event**.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/bot-events.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=5d93ee7a5e63176072e81642b5c21f9c" alt="Subscribe to bot events" width="2214" height="1392" data-path="public/images/applications/bot-events.png" />

* Add the following events (ensure corresponding scopes are already granted under OAuth permissions):

  * app\_home\_opened – Triggered when a user clicks into your App Home (no additional scope needed).
  * app\_mention – Subscribes to messages that mention your app or bot (app\_mentions:read scope required).
  * message.im – Subscribes to messages in direct message channels (im:history scope required).
  * message.mpim – Subscribes to messages in multi-party direct message channels (mpim:history scope required).

5. (Optional) Under **Subscribe to events on behalf of users**, click **Add Workspace Event** and select:

   * message.im – Subscribes to messages posted in a direct message channel on behalf of users (im:history scope required).

Slack automatically adds the necessary scopes for any subscribed events if not already included.

<img noZoom src="https://mintcdn.com/collatedocs/lyQrThlmh8cYozqe/public/images/applications/subscribe-events.png?fit=max&auto=format&n=lyQrThlmh8cYozqe&q=85&s=e81c94d827ad82be3b4c8293f7eda818" alt="Subscribe to events on behalf of users" width="1696" height="674" data-path="public/images/applications/subscribe-events.png" />

### Install the App to Workspace

1. Still in **OAuth & Permissions**, click **Install** to install App to your Workspace.

<img noZoom src="https://mintcdn.com/collatedocs/rwgp94CnO_DBWElR/public/images/applications/slack9.png?fit=max&auto=format&n=rwgp94CnO_DBWElR&q=85&s=d84953cc2d35c74e6d7413cb257096be" alt="Configuration" width="1964" height="923" data-path="public/images/applications/slack9.png" />

2. Authorize the permissions requested by the app.

After installation, you'll be redirected to the OAuth screen where your tokens will be displayed.

### Copy the Tokens

* **Bot User OAuth Token**: Starts with `xoxb-...`
* **User OAuth Token**: Starts with `xoxp-...`

Store these tokens securely and provide them in the Slack app configuration within Collate.

<Tip>
  * Never expose your tokens publicly.
  * Rotate tokens periodically.
  * Use Slack's [token rotation policy](https://api.slack.com/authentication/token-types#rotating) for better security.
</Tip>

For more information, refer to the [Slack API documentation](https://api.slack.com/).
