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

# Slack

> Connect Lukan to Slack via Socket Mode for messaging and pipeline approvals.

The Slack plugin connects Lukan to your Slack workspace using Socket Mode — no public URL needed.

## Setup

### 1. Create a Slack App

1. Go to [api.slack.com/apps](https://api.slack.com/apps) and create a new app
2. In **OAuth & Permissions**, add bot scopes: `chat:write`, `app_mentions:read`, `channels:history`, `im:history`, `groups:history`
3. In **Socket Mode**, enable it and create an App-Level Token with `connections:write` scope
4. In **Event Subscriptions**, subscribe to `app_mention` and `message.im`
5. Install the app to your workspace

### 2. Configure in Lukan

```bash theme={null}
lukan plugin install slack
lukan sk config set botToken "xoxb-YOUR-BOT-TOKEN"
lukan sk config set appToken "xapp-YOUR-APP-TOKEN"
lukan plugin start slack
```

## Configuration

| Field             | Description                                             |
| ----------------- | ------------------------------------------------------- |
| `botToken`        | Bot User OAuth Token (`xoxb-...`)                       |
| `appToken`        | App-Level Token for Socket Mode (`xapp-...`)            |
| `allowedChannels` | Channel IDs where the bot responds (empty = everywhere) |
| `allowedUsers`    | User IDs allowed to interact (empty = all)              |
| `prefix`          | Command prefix filter                                   |

## Pipeline Approvals

Slack works as a notification channel for approval gates. You can use:

* **Channel ID** (`C01ABC123`) — sends to the channel
* **User ID** (`U01XYZ789`) — sends a DM to the user

To find IDs: right-click the channel or user in Slack and select **Copy Link** or **View Details**.
