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

# Slack

> Post messages, send DMs, manage channels, reactions, and files in Slack.

# Slack

Send messages to Slack channels and DM users from any automation. React to messages, manage channels, upload files, and handle app mentions — all via the Slack Web API.

## Authentication

**Auth type:** Bot token (OAuth 2.0)

Create a Slack app at [api.slack.com/apps](https://api.slack.com/apps). Add bot token scopes: `chat:write`, `chat:write.public`, `im:write`, `channels:join`, `channels:manage`, `channels:read`, `reactions:write`, `files:write`. Install the app to your workspace and copy the **Bot User OAuth Token** (`xoxb-...`).

| Credential    | Description                                 |
| ------------- | ------------------------------------------- |
| **Bot Token** | Slack bot OAuth token starting with `xoxb-` |

## Triggers

| Trigger                     | When it fires                                  |
| --------------------------- | ---------------------------------------------- |
| **Message Posted**          | A new message is posted in a monitored channel |
| **Direct Message Received** | A user sends a DM to the bot                   |
| **Reaction Added**          | A reaction emoji is added to any message       |
| **App Mention**             | A user mentions the bot with `@botname`        |

<Note>
  Triggers require configuring Slack Event Subscriptions in your app settings, pointing to your Collabase webhook endpoint.
</Note>

## Actions

<AccordionGroup>
  <Accordion title="Messages">
    | Action                  | Key inputs                                           | Key outputs     |
    | ----------------------- | ---------------------------------------------------- | --------------- |
    | **Send Message**        | `channel`, `text`, `username`, `iconEmoji`, `blocks` | ok, ts, channel |
    | **Send Direct Message** | `userId`, `text`                                     | ok, ts          |
    | **Update Message**      | `channel`, `ts` (message timestamp), `text`          | ok, ts          |
    | **Delete Message**      | `channel`, `ts`                                      | ok              |
  </Accordion>

  <Accordion title="Reactions & files">
    | Action           | Key inputs                                                   | Key outputs       |
    | ---------------- | ------------------------------------------------------------ | ----------------- |
    | **Add Reaction** | `channel`, `ts`, `emoji` (without `:`)                       | ok                |
    | **Upload File**  | `channels`, `fileUrl`, `filename`, `title`, `initialComment` | fileId, permalink |
  </Accordion>

  <Accordion title="Channel management">
    | Action                     | Key inputs          | Key outputs                  |
    | -------------------------- | ------------------- | ---------------------------- |
    | **Create Channel**         | `name`, `isPrivate` | id, name                     |
    | **Invite User to Channel** | `channel`, `userId` | ok                           |
    | **Get Channel Info**       | `channel`           | id, name, topic, memberCount |
    | **List Members**           | `channel`           | members\[], count            |
  </Accordion>
</AccordionGroup>

<Tip>
  Use the channel's **ID** (e.g. `C012AB3CD`), not its display name, for reliable delivery. Right-click the channel in Slack → **Copy link** — the last URL segment is the ID.
</Tip>
