Slack
Send messages, manage channels, and list users in Slack workspaces.
Authentication
| Type | Default | Details |
|---|---|---|
bot_token | ✅ | Bot User OAuth Token (xoxb-...) passed as Authorization: Bearer |
oauth_2 | Slack OAuth v2 flow for user tokens |
Slack Bot Tokens are the common server-side path. The token is sent as a Bearer header on every request to https://slack.com/api.
Endpoints
| Path | Risk | Description |
|---|---|---|
messages.send | write | Send a message to a channel or DM. |
messages.delete | destructive | Delete a previously sent message. |
channels.list | read | List channels in the workspace. |
channels.create | write | Create a new public or private channel. |
channels.archive | destructive | Archive a channel (recoverable). |
channels.invite | write | Invite one or more users to a channel. |
users.list | read | List workspace users. |
users.get | read | Get info about a single user. |
messages.send
Send a message to a public channel, private channel, or DM.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | ✅ | Channel ID (e.g. C01...) or DM ID |
text | string | ✅ | Message text |
thread_ts | string | Thread timestamp to reply in a thread |
Output: { ok: boolean; channel?: string; ts?: string }
messages.delete
Delete a previously sent message.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | ✅ | Channel ID containing the message |
ts | string | ✅ | Message timestamp |
Output: { ok: boolean }
channels.list
List channels in the workspace with pagination.
Input:
| Field | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | number | Max results per page |
Output: { ok: boolean; channels?: SlackChannel[]; response_metadata?: { next_cursor?: string } }
channels.create
Create a new channel.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Channel name (no #) |
is_private | boolean | Create as private channel |
Output: { ok: boolean; channel?: SlackChannel }
channels.archive
Archive a channel.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | ✅ | Channel ID |
Output: { ok: boolean }
channels.invite
Invite users to a channel.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | ✅ | Channel ID |
users | string | ✅ | Comma-separated user IDs |
Output: { ok: boolean; channel?: SlackChannel }
users.list
List workspace users.
Input:
| Field | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | number | Max results per page |
Output: { ok: boolean; members?: SlackUser[]; response_metadata?: { next_cursor?: string } }
users.get
Get a single user's profile.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
user | string | ✅ | User ID |
Output: { ok: boolean; user: SlackUser }
Usage
import { createFabric } from "@fabricorg/integrations";
import { slack } from "@fabricorg/integrations/plugins";
const fabric = createFabric({
plugins: [
slack({ authType: "bot_token", botToken: process.env.SLACK_BOT_TOKEN }),
],
});
// Send a message
await fabric.slack.api.messages.send({
channel: "C01ABCDEF",
text: "Hello from Fabric!",
});
// List channels
const { channels } = await fabric.slack.api.channels.list();Webhooks
Slack webhooks are not yet implemented in this plugin. Phase 6 will add event subscription support for message, channel, and member events.
Types
interface SlackUser {
id: string;
name: string;
real_name?: string;
is_bot?: boolean;
deleted?: boolean;
}
interface SlackChannel {
id: string;
name: string;
is_private?: boolean;
is_archived?: boolean;
}