---
title: Slack
description: Configure Slack as a chat provider in Notiflows
---

Slack integration enables notifications to be sent as direct messages or to channels in your Slack workspace.

## Configuration

To create a chat channel with Slack, configure the following:

| Field | Required | Description |
|-------|----------|-------------|
| Bot Token | Yes | Bot User OAuth Token (starts with `xoxb-`) |

## Prerequisites

Before configuring Slack in Notiflows:

1. A Slack workspace
2. A Slack app created at [api.slack.com/apps](https://api.slack.com/apps)

## Creating a Slack App

1. Go to [api.slack.com/apps](https://api.slack.com/apps)
2. Click **Create New App** > **From scratch**
3. Enter an app name and select your workspace
4. Go to **OAuth & Permissions** and add the following bot token scopes:
   - `chat:write` — Send messages
   - `chat:write.public` — Send messages to channels without joining
   - `channels:read` — List public channels
   - `groups:read` — List private channels
   - `users:read` — Look up users (optional, for user ID resolution)
   - `users:read.email` — Look up users by email (optional)
5. Click **Install to Workspace** and authorize the app
6. Copy the **Bot User OAuth Token** (`xoxb-...`)

## Setup in Notiflows

1. Navigate to **Channels** in your project
2. Click **Create Channel**
3. Select **Chat** as the channel type
4. Select **Slack** as the provider
5. Paste your Bot Token
6. Save the channel

## User Channel Settings

To send Slack notifications to a user, set their Slack channel settings via the Admin API:

```bash
curl -X PUT /api/admin/v1/users/:user_external_id/channel-settings/:channel_id \
  -d '{ "settings": { "slack_user_id": "U0123456789" } }'
```

| Field | Description |
|-------|-------------|
| `slack_user_id` | Slack member ID for direct messages (starts with `U`) |
| `slack_channel_id` | Slack channel ID for channel messages (starts with `C`) |

At least one must be provided. To find a user's Slack member ID, open their profile in Slack and click **Copy member ID**.

## Templates

Chat templates support two content types:
- **Markdown** — Simple markdown formatting, converted to Slack's `mrkdwn` format
- **JSON** — Slack Block Kit format for rich messages

Use Liquid templating for dynamic content:

```liquid
New order from {{ actor.first_name }}: #{{ data.order_id }}
```

Available variable contexts:
- `recipient.*` — Recipient user data
- `actor.*` — User who triggered the notification
- `data.*` — Custom payload passed when triggering the notiflow
