Appearance
Slack integration
Slack is a channel‑based communication platform for teams. This integration lets you send messages to channels/DMs and read conversation and user lists using a bot token.
Use cases
- Notify channels on workflow events (new orders, failed jobs)
- Post threaded replies for support workflows
- Send direct messages (DMs) to users programmatically
- Fetch channels and users to power pickers in your app
Setup
- Create a Slack app in your workspace and add a Bot user.
- In Slack, go to
OAuth & Permissionsand add the scopes you need for the actions you plan to use:chat:write— Send messages.chat:write.customize— Optional. Set a custom bot name or icon per message.channels:read— List/select public channels in WeWeb.groups:read— List/select private channels in WeWeb.im:read— List/select direct message conversations in WeWeb.mpim:read— List/select group direct message conversations in WeWeb.users:read— List/select users in WeWeb (needed for DMs and history pickers).im:write— Send direct messages (DMs).mpim:write— Send group direct messages.channels:history— Read message history in public channels.groups:history— Read message history in private channels.im:history— Read message history in direct messages.mpim:history— Read message history in group direct messages.
- Install the app to your workspace and copy the Bot Token (starts with
xoxb-). - In WeWeb, add the Bot Token to the
EditorandProductionmodes and run a simple test (e.g., send a message to a private test channel).
Common pitfalls (setup & usage)
Missing scopes or not invited
For private channels, the bot must be invited. Missing scopes or lack of membership commonly result in not_in_channel or missing_scope errors.
Block kit formatting
When sending blocks, ensure valid Block Kit JSON. Invalid blocks cause invalid_blocks errors.
Creating messages with Block Kit
Block Kit is Slack’s way of building rich, structured messages (sections, headers, buttons, images, etc.) instead of plain text. In the Send message action, you can pass a Blocks input: a JSON array of block objects. Each block has a type (e.g. section, header, divider, image, actions) and type-specific fields (e.g. text, accessory, elements). Slack renders the blocks in order to form the message layout.
You don’t need to learn every block type up front. A few common ones:
- Section — Text (with optional markdown) and/or an accessory (image, button, select menu).
- Header — Bold heading.
- Divider — Horizontal line.
- Actions — Row of interactive elements (buttons, selects).
- Context — Small, gray contextual text.
- Image — Image with optional title and alt text.
Slack validates the structure; invalid or unsupported blocks produce invalid_blocks errors. For full reference, block types, and examples, see Slack’s docs: Block Kit reference and Building Block Kit messages.
Example prompt for AI-generated Block Kit
If you use an AI assistant to generate Block Kit JSON, you can prompt it like this:
“Generate Slack Block Kit JSON for a message that [describe what you want]. Use only valid Slack block types (section, header, divider, actions, image, context, etc.). Output a single JSON array of blocks, no markdown code fence. Include a plain-text fallback for accessibility.”
Then paste the resulting array into the Blocks field (or bind it from a variable). Always provide Message Text or Fallback Message when using blocks so notifications and accessibility have a text version.
All Actions
This integration provides four actions mapped to Slack Web API.
| Action | Description |
|---|---|
| Send message | Send a message to a channel or DM |
| List channels | List channels (and DM conversations) with paging and filters |
| List users | List users with paging and locale option |
| Get conversation history | Read messages from a channel or DM with paging and time filters |
Action details
Send message
Send a message to a channel or DM, optionally as a thread reply.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Send to | "public_channel" | Where the message should be sent (public channel, private channel, DM, or group DM). | Required |
Channel | "C0123456789" | The channel to send a message to. Only shown when Send to is a channel type. | Required for channels |
User | "U01234567" | The user to send a DM to. Only shown when Send to is Direct Message. | Required for DMs |
Users | ["U01234567","U98765432"] | Users to send a group DM to. Only shown when Send to is Group DM. | Required for group DMs |
Message type | "Text" | Choose Text or Block Kit. | Required |
Message Text | "Hello, team!" | Message text (supports Slack mrkdwn). Only shown when Message type is Text. | Required for Text |
Fallback Message | "Summary for notifications" | Plain-text fallback for notifications and accessibility. Only shown when Message type is Block Kit. | Required for Block Kit |
Blocks | [{"type":"section","text":{"type":"mrkdwn","text":"Hello"}}] | Block Kit JSON array. Only shown when Message type is Block Kit. | Required for Block Kit |
Unfurl LinksOptional | true | Show previews for links. | Boolean |
Unfurl MediaOptional | true | Show previews for media. | Boolean |
Bot UsernameOptional | "WeWeb Bot" | Override the bot username for this message. | String |
Icon URLOptional | "https://…" | URL to an image to use as the bot icon for this message. | Valid URL |
Thread TimestampOptional | "1721052367.000300" | Reply to a thread by providing the parent message timestamp (ts). | Message ts |
MetadataOptional | {"event_type":"order","event_payload":{"id":"123"}} | Attach structured metadata to the message. | Object |
Example output
json
{ "ok": true, "ts": "1721052367.000300", "channel": "C0123456789" }Documentation of API endpoint that powers action: Slack API – chat.postMessage
List Channels
List channels with filters and pagination.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Channel Types | ["public_channel","private_channel"] | Types of conversations to include (default is public_channel). | Array of strings |
LimitOptional | 100 | Maximum number of conversations to return per page. | 1–1000 |
CursorOptional | "dGVhbTo…==" | Pagination cursor | String |
Team IDOptional | "T0123456789" | Filter by team | String |
Exclude ArchivedOptional | false | Hide archived channels | Boolean |
Example output
json
{ "ok": true, "channels": [ { "id": "C0123456789", "name": "general" } ] }Documentation of API endpoint that powers action: Slack API – conversations.list
List Users
List users with pagination and locale information.
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
LimitOptional | 100 | Maximum number of users to return per page. | 1–1000 |
CursorOptional | "dGVhbTo…==" | Pagination cursor | String |
Include LocaleOptional | false | Include user locale | Boolean |
Team IDOptional | "T0123456789" | Filter by team | String |
Example output
json
{ "ok": true, "members": [ { "id": "U01234567", "name": "alice" } ] }Documentation of API endpoint that powers action: Slack API – users.list
Get conversation history
Retrieve messages from a conversation (channel, DM, or group DM), with optional time filters and pagination.
This action is useful when you need to read recent messages (for example to build a simple internal inbox, or to check the last message posted by your bot).
Inputs
| Display Key | Example Input | Description | Restrictions |
|---|---|---|---|
Conversation type | "public_channel" | Where you want to read messages from (public channel, private channel, DM, or group DM). | Required |
Channel | "C0123456789" | Channel to read messages from. Only shown when Conversation type is a channel type. | Required for channels |
User | "U01234567" | User to read DM history with. Only shown when Conversation type is Direct Message. | Required for DMs |
Users | ["U01234567","U98765432"] | Users to read group DM history with. Only shown when Conversation type is Group DM. | Required for group DMs |
OldestOptional | "1721052000.000000" | Only include messages after this timestamp (ts). | Message ts |
LatestOptional | "1721052600.000000" | Only include messages before this timestamp (ts). | Message ts |
Include boundariesOptional | false | Include messages that match Oldest / Latest exactly. | Boolean |
LimitOptional | 100 | Maximum number of messages to return per page. | 1–1000 |
CursorOptional | "dGVhbTo…==" | Pagination cursor for the next page. | String |
Documentation of API endpoint that powers action: Slack API – conversations.history
Error handling
| Error code and type | Reason |
|---|---|
| 401 Unauthorized | Invalid or missing bot token. |
| 403 Forbidden | Missing scopes or the bot is not a member of the channel. |
| 404 Not Found | Channel, user, or resource not found. |
| 400 Bad Request | Invalid parameters or malformed Block Kit. |
| 429 Too Many Requests | Rate limited; retry with Retry-After. |
| 500 Internal Server Error | Provider-side error; retry with backoff. |
FAQs
Why do I get not_in_channel when posting?
This means the bot is not a member of the channel you’re trying to post in.
- Invite the bot to the channel in Slack.
- Make sure your app has
chat:write.
Should I send text when using blocks?
Yes. Slack recommends a plain-text fallback so notifications and accessibility tools have a text version.
How do I send a DM if I only know the user ID?
Use Send message and choose Direct Message. You can select a user (or bind a user ID) and WeWeb will send the message to that user.
Why can’t I see a channel in the channel dropdown?
This usually happens for one of these reasons:
- The bot is not a member of that channel yet.
- The channel is private and your bot is missing
groups:read. - You’re trying to list DMs or group DMs but your bot is missing
im:readormpim:read.
After you add scopes in Slack, reinstall the app to your workspace so the new scopes apply.
What’s the difference between a Channel ID and a channel name?
WeWeb expects a Channel ID (for example C0123456789) when you bind the Channel field.
If you’re unsure which value to use, run List channels and use the id from the result.
How do I reply in a thread?
In Send message, set Thread Timestamp to the ts of the message you want to reply to.
You can get ts from:
- The response of a previous Send message step, or
- The messages returned by Get conversation history.
Why does “Get conversation history” return an empty list?
Common causes:
- The bot is not a member of that channel.
- The bot is missing the correct history scope for the conversation type (
channels:history,groups:history,im:history, ormpim:history). - Your
Oldest/Latestfilters exclude all messages.
How do I get more than the first page of channels/users/messages?
Use the Cursor value from the previous response to retrieve the next page.
- List channels: use
response_metadata.next_cursor - List users: use
response_metadata.next_cursor - Get conversation history: use
response_metadata.next_cursor
Why does Slack say missing_scope even though I added the scope?
After changing scopes in Slack, you must reinstall the Slack app to your workspace so the new scopes apply to the bot token.
When do I need chat:write.customize?
Only if you use Bot Username or Icon URL in Send message to override the bot name/icon for a message. If you don’t use those fields, you can skip chat:write.customize.
Why am I getting rate limited (429)?
Slack is limiting how fast you can call their API.
If you see a Retry-After value, wait that long before trying again. If you’re sending lots of messages, add a short delay between runs or group notifications into a single message.

