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

# Slack

> Pull DMs and channel messages into contact timelines automatically.

<Note>
  Requires creating a Slack app. Done once by the server admin — users then connect their own Slack accounts via the UI.
</Note>

## Server Setup

<Steps>
  <Step title="Create a Slack app">
    Go to [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App → From scratch**. Give it a name and pick your workspace.
  </Step>

  <Step title="Add OAuth scopes">
    Go to **OAuth & Permissions → Scopes → User Token Scopes** and add:

    ```
    channels:history
    channels:read
    im:history
    im:read
    mpim:history
    users:read
    users:read.email
    ```
  </Step>

  <Step title="Set the redirect URI">
    Under **OAuth & Permissions → Redirect URLs**, add:

    ```
    https://api.yourdomain.com/api/oauth/slack/callback
    ```
  </Step>

  <Step title="Copy Client ID and Client Secret">
    Go to **Basic Information → App Credentials** and copy your **Client ID** and **Client Secret**.
  </Step>

  <Step title="Add to nous.env">
    ```bash theme={null}
    SLACK_CLIENT_ID=your-client-id
    SLACK_CLIENT_SECRET=your-client-secret
    SLACK_REDIRECT_URI=https://api.yourdomain.com/api/oauth/slack/callback
    ```

    Restart your containers after saving.
  </Step>
</Steps>

## Connecting in Nous

1. Go to **Settings → Integrations**
2. Click **+ Add Integration → Slack**
3. Complete the OAuth flow in the popup

## What gets synced

| Data            | How                    | Frequency  |
| --------------- | ---------------------- | ---------- |
| Direct messages | Slack API (user token) | Every hour |
