Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

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

  1. Create a Slack app in your workspace and add a Bot user.
  2. In Slack, go to OAuth & Permissions and 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.
  3. Install the app to your workspace and copy the Bot Token (starts with xoxb-).
  4. In WeWeb, add the Bot Token to the Editor and Production modes 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.

ActionDescription
Send messageSend a message to a channel or DM
List channelsList channels (and DM conversations) with paging and filters
List usersList users with paging and locale option
Get conversation historyRead 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 KeyExample InputDescriptionRestrictions
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 Links
Optional
trueShow previews for links.Boolean
Unfurl Media
Optional
trueShow previews for media.Boolean
Bot Username
Optional
"WeWeb Bot"Override the bot username for this message.String
Icon URL
Optional
"https://…"URL to an image to use as the bot icon for this message.Valid URL
Thread Timestamp
Optional
"1721052367.000300"Reply to a thread by providing the parent message timestamp (ts).Message ts
Metadata
Optional
{"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 KeyExample InputDescriptionRestrictions
Channel Types["public_channel","private_channel"]Types of conversations to include (default is public_channel).Array of strings
Limit
Optional
100Maximum number of conversations to return per page.1–1000
Cursor
Optional
"dGVhbTo…=="Pagination cursorString
Team ID
Optional
"T0123456789"Filter by teamString
Exclude Archived
Optional
falseHide archived channelsBoolean

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 KeyExample InputDescriptionRestrictions
Limit
Optional
100Maximum number of users to return per page.1–1000
Cursor
Optional
"dGVhbTo…=="Pagination cursorString
Include Locale
Optional
falseInclude user localeBoolean
Team ID
Optional
"T0123456789"Filter by teamString

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 KeyExample InputDescriptionRestrictions
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
Oldest
Optional
"1721052000.000000"Only include messages after this timestamp (ts).Message ts
Latest
Optional
"1721052600.000000"Only include messages before this timestamp (ts).Message ts
Include boundaries
Optional
falseInclude messages that match Oldest / Latest exactly.Boolean
Limit
Optional
100Maximum number of messages to return per page.1–1000
Cursor
Optional
"dGVhbTo…=="Pagination cursor for the next page.String

Documentation of API endpoint that powers action: Slack API – conversations.history

Error handling

Error code and typeReason
401 UnauthorizedInvalid or missing bot token.
403 ForbiddenMissing scopes or the bot is not a member of the channel.
404 Not FoundChannel, user, or resource not found.
400 Bad RequestInvalid parameters or malformed Block Kit.
429 Too Many RequestsRate limited; retry with Retry-After.
500 Internal Server ErrorProvider-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:read or mpim: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, or mpim:history).
  • Your Oldest / Latest filters 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.