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.
| Field | Type | Required | Description |
|---|---|---|---|
| Bot Token | string | Yes | Your Slack bot token, starting with xoxb-. Stored securely. |
| Signing Secret | string | Yes | The Slack app signing secret used to verify that incoming requests really come from Slack. |
| Session Mode | enum | No | How Sessions are scoped: PerChannel, PerThread, or PerUserPerChannel. Default: PerThread. |
| Use Threads for Replies | boolean | No | When enabled, bot replies are posted as thread replies. Default: on. |
| Auto-Start Workflow on Message | boolean | No | When enabled, a new Session starts automatically when a message is received. Default: off. |
| Default Channel | string | No | Optional 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
| Property | Type | Required | Example | Description |
|---|---|---|---|---|
| (none) | — | — | — | The StartTask has no configurable properties. |
Behavior
- A Slack message starts a new Session and Token on the
SlackChannelChannel. - The Task records the Slack context on the Session — workspace, channel, thread, and user — and stores the incoming message text in the conversation history.
- 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
| Property | Type | Required | Example | Description |
|---|---|---|---|---|
| Output Message | string | Yes | Hi {userName}, your ticket is open. | The text posted to Slack. Supports {variable} placeholders for dynamic values. |
Behavior
- The Task resolves every
{variable}placeholder against the current Session variables. - Special characters in the resolved text are posted as literal text, so user-supplied content cannot trigger
@channelpings or disguised links. - It posts the message to the Slack channel — or to the conversation's thread when Use Threads for Replies is on.
- 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
| Property | Type | Required | Example | Description |
|---|---|---|---|---|
| Prompt Message | string | Yes | What is your order number? | Message posted to Slack before waiting for a reply. Supports {variable} placeholders. |
| Store in Variable | string | Yes | {userReply} | On the SlackChannel Channel, type the variable as a {name} reference. The user's reply text is saved there. |
Behavior
- The Task resolves
{variable}placeholders in the prompt and posts it to the channel or thread. - The Token pauses at this node and the Session waits for the next message from the Slack user in the same conversation.
- 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
| Property | Type | Required | Example | Description |
|---|---|---|---|---|
| Goodbye Message | string | No | Thanks {userName}, all done! | Final message posted before the Session ends. Supports {variable} placeholders. Default: empty (no message). |
Behavior
- If a Goodbye Message is set, the Task resolves its
{variable}placeholders and posts it to the channel or thread. - 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
| Property | Type | Required | Example | Description |
|---|---|---|---|---|
| Block Kit JSON | string | Yes | [{"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
- 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. - It posts the blocks to the Slack channel — or to the conversation's thread when Use Threads for Replies is on.
- 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.
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.
- Environment configuration — Session Mode
PerThread, Use Threads for Replies on. - 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. - 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. - OutputTask — Output Message
Thanks! Your ticket has been created: "{issueText}". - 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.
- SlackBlockMessage — Block Kit JSON
[{"type":"section","text":{"type":"mrkdwn","text":"*Order {orderId}*\nTotal: {orderTotal}"}}]posts the formatted summary. - InputTask — Prompt Message
Reply *yes* to confirm or *no* to cancel., Store in Variable{confirmReply}. - SwitchTask (Standard Module) — Variable to evaluate
{confirmReply}; Case: OpContains, Valueyes, Branchconfirm; Default branchother. Label the outgoing Sequence Flowsconfirmandother. - OutputTask, one per branch —
confirmpostsOrder {orderId} confirmed!;otherpostsOrder {orderId} was cancelled. - EndTask — ends the Session.
Best practices
- Use thread-based Session Mode —
PerThreadkeeps each conversation isolated in its own Slack thread, preventing cross-talk between users. - Secure your signing secret — never share or expose the signing secret set in the Environment configuration. Rotate it if compromised.
- Test with Auto-Start disabled — during development, keep Auto-Start Workflow on Message off and trigger workflows manually to avoid unexpected Sessions.
- 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
| Code | Name | Description |
|---|---|---|
| 3005 | TaskInvalidData | A required Task field (e.g. the message or the store variable) is empty. See full details |
| 4001 | ModuleException | Slack rejected the message or an unexpected error occurred while calling Slack. See full details |
| 4008 | ModuleMissingConfiguration | The Bot Token is not set in the Environment configuration. See full details |
| 4012 | ModuleInvalidData | The Session is not bound to a Slack conversation. See full details |