Skip to main content

Slack Module

Build workflows that interact with Slack workspaces — receive messages, reply in threads, and automate conversations.

The Slack Module provides channel-specific Task implementations for the SlackChannel Channel. When a Slack message triggers a Session, the engine runs this Module's behavior for the Start, Output, Input, and End Tasks, plus a dedicated Block Kit Task for rich messages. This lets you build Slack bots and automated responders using the same BPMN editor you use for chat and voice workflows. It requires Environment configuration: a Slack bot token and signing secret.

How it works

When a message arrives from a connected Slack workspace, the Module creates or continues a Session on the SlackChannel Channel. The Token moves through the Process, and at each I/O node the Slack-specific behavior runs: Output Tasks post messages to the Slack channel or thread, Input Tasks wait for the user's next Slack message, and the SlackBlockMessage Task sends rich Slack Block Kit messages.

Session identity can be scoped per channel, per thread, or per user — controlled by the Session Mode setting in the Module's Environment configuration.

Configuration

The Slack Module is configured per Environment — each Environment supplies its own Slack bot token and signing secret, so your Development and Production Environments can each talk to their own Slack app. Set these values in the Module's Environment configuration.

FieldTypeRequiredDescription
Bot TokenstringYesYour Slack bot token, starting with xoxb-. Stored securely.
Signing SecretstringYesThe Slack app signing secret used to verify that incoming requests really come from Slack.
Session ModeenumNoHow Sessions are scoped: PerChannel, PerThread, or PerUserPerChannel. Default: PerThread.
Use Threads for RepliesbooleanNoWhen enabled, bot replies are posted as thread replies. Default: on.
Auto-Start Workflow on MessagebooleanNoWhen enabled, a new Session starts automatically when a message is received. Default: off.
Default ChannelstringNoOptional Slack channel ID (e.g. C01ABCDEF) where the bot listens by default. Default: empty.

Tasks

The Slack Module provides channel-specific behavior for the standard I/O Tasks defined by the Standard Module, plus a SlackBlockMessage Task for rich content. The property panel for the standard Tasks is identical to the chat versions; only the runtime behavior differs.

StartTask (Channel: SlackChannel)

Initializes the Slack Session when a message arrives.

Properties

PropertyTypeRequiredExampleDescription
(none)The StartTask has no configurable properties.

Behavior

  1. A Slack message starts a new Session and Token on the SlackChannel Channel.
  2. The Task records the Slack context on the Session — workspace, channel, thread, and user — and stores the incoming message text in the conversation history.
  3. The Token moves to the next node.

Example

A user posts I need help with my invoice in a channel your Slack app is connected to. A new Session starts, the StartTask binds it to that channel, thread, and user, and the Token moves along the outgoing Sequence Flow — typically to an OutputTask that greets the user.

OutputTask (Channel: SlackChannel)

Posts a text message to the Slack channel or thread.

Properties

PropertyTypeRequiredExampleDescription
Output MessagestringYesHi {userName}, your ticket is open.The text posted to Slack. Supports {variable} placeholders for dynamic values.

Behavior

  1. The Task resolves every {variable} placeholder against the current Session variables.
  2. Special characters in the resolved text are posted as literal text, so user-supplied content cannot trigger @channel pings or disguised links.
  3. It posts the message to the Slack channel — or to the conversation's thread when Use Threads for Replies is on.
  4. If Slack rejects the message, the Session records an error instead of continuing silently.

Example

Output Message Your order {orderId} has shipped. with {orderId} = A-1042 posts Your order A-1042 has shipped. as a reply in the conversation's thread, and the Token immediately continues to the next node.

InputTask (Channel: SlackChannel)

Posts a prompt and waits for the Slack user's next message.

Properties

PropertyTypeRequiredExampleDescription
Prompt MessagestringYesWhat is your order number?Message posted to Slack before waiting for a reply. Supports {variable} placeholders.
Store in VariablestringYes{userReply}On the SlackChannel Channel, type the variable as a {name} reference. The user's reply text is saved there.

Behavior

  1. The Task resolves {variable} placeholders in the prompt and posts it to the channel or thread.
  2. The Token pauses at this node and the Session waits for the next message from the Slack user in the same conversation.
  3. The reply text is written into the configured variable and the Token resumes. If the reply includes file attachments, their name, type, and size are stored alongside the reply (file contents are not downloaded).

Example

Prompt Message What is your order number?, Store in Variable {orderId}. The bot posts the question in the thread and the Session waits. The user replies A-1042; the Token resumes and {orderId} now holds A-1042, ready for a later Task to look the order up.

EndTask (Channel: SlackChannel)

Finalizes the Slack Session, optionally posting a final message.

Properties

PropertyTypeRequiredExampleDescription
Goodbye MessagestringNoThanks {userName}, all done!Final message posted before the Session ends. Supports {variable} placeholders. Default: empty (no message).

Behavior

  1. If a Goodbye Message is set, the Task resolves its {variable} placeholders and posts it to the channel or thread.
  2. The Slack conversation is unlinked from the Session and the Session is marked as completed.

Example

Goodbye Message Thanks {userName}, your request is closed. with {userName} = Maria posts Thanks Maria, your request is closed. in the thread and ends the Session. With the field left empty, the Session simply ends silently.

SlackBlockMessage (Channel: SlackChannel)

Sends a rich message using Slack Block Kit formatting — sections, images, buttons, and other layout blocks.

Properties

PropertyTypeRequiredExampleDescription
Block Kit JSONstringYes[{"type":"section","text":{"type":"mrkdwn","text":"Order *{orderId}* is ready."}}]Raw Slack Block Kit JSON — an array of blocks (or a single block object). Supports {variable} placeholders; each value is inserted as safely encoded text, so user-supplied content cannot inject extra buttons or links.

A minimal Block Kit JSON value with a header and a section:

[
{ "type": "header", "text": { "type": "plain_text", "text": "Order update" } },
{ "type": "section", "text": { "type": "mrkdwn", "text": "Order *{orderId}* shipped to {customerName}." } }
]

Behavior

  1. The Task resolves every {variable} placeholder in the Block Kit JSON. Each value is JSON-encoded as it is inserted, so it stays inside its text field and cannot add new blocks or buttons.
  2. It posts the blocks to the Slack channel — or to the conversation's thread when Use Threads for Replies is on.
  3. If the JSON cannot be parsed as Block Kit blocks, the text is posted as a plain message instead.

Example

Block Kit JSON [{"type":"section","text":{"type":"mrkdwn","text":"*Ticket {ticketId}* was assigned to {agentName}."}}] with {ticketId} = T-88 and {agentName} = Luca posts a formatted section reading Ticket T-88 was assigned to Luca, and the Token continues to the next node.

info

Block Kit supports many block types — sections, images, dividers, context, and interactive elements. See the Slack Block Kit documentation for the payload structure, and use Slack's Block Kit Builder to design the JSON before pasting it into the Task.

Common recipes

Answer a support request in its own thread

Greet the user, collect the details, and confirm — all inside one Slack thread so the channel stays readable.

  1. Environment configuration — Session Mode PerThread, Use Threads for Replies on.
  2. OutputTask — Output Message Hi! I can open a support ticket for you. posts the greeting as a reply in the thread started by the user's message.
  3. InputTask — Prompt Message Please describe the issue in one message., Store in Variable {issueText}. The Session waits for the user's reply in the same thread.
  4. OutputTask — Output Message Thanks! Your ticket has been created: "{issueText}".
  5. EndTask — Goodbye Message left empty; the Session ends and the thread is released.

Post a rich order summary and collect a confirmation

Show the order with Block Kit formatting, then branch on the user's reply with the Standard Module's SwitchTask.

  1. SlackBlockMessage — Block Kit JSON [{"type":"section","text":{"type":"mrkdwn","text":"*Order {orderId}*\nTotal: {orderTotal}"}}] posts the formatted summary.
  2. InputTask — Prompt Message Reply *yes* to confirm or *no* to cancel., Store in Variable {confirmReply}.
  3. SwitchTask (Standard Module) — Variable to evaluate {confirmReply}; Case: Op Contains, Value yes, Branch confirm; Default branch other. Label the outgoing Sequence Flows confirm and other.
  4. OutputTask, one per branchconfirm posts Order {orderId} confirmed!; other posts Order {orderId} was cancelled.
  5. EndTask — ends the Session.

Best practices

  1. Use thread-based Session ModePerThread keeps each conversation isolated in its own Slack thread, preventing cross-talk between users.
  2. Secure your signing secret — never share or expose the signing secret set in the Environment configuration. Rotate it if compromised.
  3. Test with Auto-Start disabled — during development, keep Auto-Start Workflow on Message off and trigger workflows manually to avoid unexpected Sessions.
  4. Design Block Kit JSON in Slack's Block Kit Builder — paste a working payload into the SlackBlockMessage Task, then add {variable} placeholders inside text fields only.

Error codes

CodeNameDescription
3005TaskInvalidDataA required Task field (e.g. the message or the store variable) is empty. See full details
4001ModuleExceptionSlack rejected the message or an unexpected error occurred while calling Slack. See full details
4008ModuleMissingConfigurationThe Bot Token is not set in the Environment configuration. See full details
4012ModuleInvalidDataThe Session is not bound to a Slack conversation. See full details