Slack Block
Send messages to Slack or trigger workflows from Slack events
The Slack block provides a comprehensive Slack integration with OAuth authentication. Use it to send formatted messages with Slack's mrkdwn syntax, create canvases, read channel messages, or trigger workflows from Slack events like mentions and messages.
Overview
| Property | Value |
|---|---|
| Type | slack |
| Category | tools |
| Color | #611f69 |
When to Use
- Send notifications or status updates to a Slack channel as part of a workflow.
- Post formatted messages using Slack's mrkdwn syntax (alerts, summaries, reports).
- Create a Slack canvas with a title and markdown content to share rich documents.
- Read recent messages from a channel to ingest context into downstream blocks.
- Trigger a workflow from Slack events such as mentions or new messages via webhook.
- Authenticate with either the managed Zelaxy Bot (OAuth) or your own custom bot token.
Configuration
Operation
Dropdown selecting what the block does. Required. Options:
| Label | id |
|---|---|
| Send Message | send |
| Create Canvas | canvas |
| Read Messages | read |
Defaults to send. The active operation controls which additional fields are shown.
Authentication Method
Dropdown choosing how to authenticate. Required. Options:
| Label | id |
|---|---|
| Zelaxy Bot | oauth |
| Custom Bot | bot_token |
Defaults to oauth.
Slack Account
OAuth credential picker for the Slack workspace. Shown when Authentication Method is oauth. Requests the following scopes: channels:read, channels:history, groups:read, groups:history, chat:write, chat:write.public, users:read, files:write, canvases:write.
Bot Token
Password field for entering a Slack bot token (format: xoxb-...). Shown when Authentication Method is bot_token.
Channel (basic mode) / Channel ID (advanced mode)
Channel selector for picking the target Slack channel (basic mode). In advanced mode, enter the raw Slack channel ID directly (e.g., C1234567890). One of these must be provided for every operation.
Message
Long text input for the message body. Supports Slack mrkdwn formatting. Required for the send operation.
Canvas Title
Short text input for the title of the canvas. Required for the canvas operation.
Canvas Content
Long text input for the canvas body (markdown supported). Required for the canvas operation.
Message Limit
Number of messages to retrieve (integer, default 10, capped at 15). Applies to the read operation only.
Oldest Timestamp
ISO 8601 timestamp setting the lower time bound for the messages fetched. Optional, applies to the read operation only.
Trigger Configuration
When the block runs in trigger mode, this field configures the slack_webhook trigger to start the workflow from incoming Slack events (e.g., channel mentions, new messages).
Inputs & Outputs
Inputs:
operation(string) — Operation to perform (send,canvas, orread)authMethod(string) — Authentication method (oauthorbot_token)credential(string) — Slack OAuth access token (used with Zelaxy Bot auth)botToken(string) — Bot token (used with Custom Bot auth, formatxoxb-...)channel(string) — Channel identifier from the channel selectormanualChannel(string) — Manual channel ID override (advanced mode)text(string) — Message text for thesendoperation (supports mrkdwn)title(string) — Canvas title for thecanvasoperationcontent(string) — Canvas content in markdown for thecanvasoperationlimit(string) — Maximum number of messages to read for thereadoperationoldest(string) — Oldest timestamp boundary for thereadoperation
Outputs:
ts(string) — Message timestamp returned by the Slack API (send operation)channel(string) — Channel identifier where the message was sent (send operation)canvas_id(string) — Canvas identifier for the created canvas (canvas operation)title(string) — Canvas title (canvas operation)messages(json) — Array of message objects retrieved from the channel (read operation)event_type(string) — Type of Slack event that triggered the workflow (trigger mode)channel_name(string) — Human-readable channel name (trigger mode)user_name(string) — Username who triggered the event (trigger mode)team_id(string) — Slack workspace/team ID (trigger mode)event_id(string) — Unique event identifier for the trigger (trigger mode)
Tools
- Slack Message (
slack_message) — Sends a message to a Slack channel or user viachat.postMessage. Supports Slack mrkdwn formatting. Returnsts(message timestamp) andchannel(channel ID). - Slack Canvas Writer (
slack_canvas) — Creates and shares a collaborative Slack canvas in a channel viacanvases.create. Accepts atitleandcontent(markdown). Returnscanvas_id,channel, andtitle. - Slack Message Reader (
slack_message_reader) — Reads the latest messages from a Slack channel viaconversations.historywith optionallimitandoldesttime filtering. Returns amessagesarray where each item hasts,text,user,type, andsubtype.
YAML Example
slack_1:
type: slack
name: "Slack"
inputs:
operation: "send"
authMethod: "oauth"
credential: "{{SLACK_OAUTH_TOKEN}}"
channel: "C1234567890"
text: "Deployment finished: {{start.input}}"
connections:
outgoing:
- target: next-block-id