Slack Writer¶
Sends messages to Slack channels, users, or threads using a Slack Bot token. Supports both plain text and rich Block Kit payloads, automatically generating a text fallback from Block Kit for broader client compatibility. Can reply in threads and customize bot icon via emoji or image URL.

Usage¶
Use this node to post notifications, status updates, or rich interactive messages to Slack during a workflow. Provide a valid Slack Bot token, target channel (name, channel ID, or user ID), and either plain text or a Block Kit JSON payload. For replies, pass a thread timestamp to post within an existing thread.
Inputs¶
| Field | Required | Type | Description | Example | 
|---|---|---|---|---|
| slack_token | True | PASSWORD | Slack Bot OAuth token used to authenticate API requests. Obtain via Slack's quick-start app setup. | |
| channel | True | STRING | Destination in Slack. Accepts channel name (e.g., #general), channel ID (e.g., C0123456789), or user ID (e.g., U0123456789). User IDs are resolved to a DM channel automatically. | #alerts | 
| icon_emoji | False | STRING | Emoji to use as the bot icon (requires chat:write.customize). Ignored if empty or if icon_url is also set. | :robot_face: | 
| icon_url | False | STRING | Direct URL to an image to use as the bot icon (512x512 or smaller; requires chat:write.customize). | https://example.com/bot.png | 
| thread_timestamp | False | STRING | Slack message timestamp to reply to, posting the message in that thread. | 1734479286.246919 | 
| message | False | STRING | Plain text message content. Ignored if block_kit_json is provided. | Hello from Salt AI! | 
| block_kit_json | False | STRING | Block Kit JSON array for rich message content. Must be a JSON list of valid blocks. A text fallback is auto-generated from contained text items. | [{"type":"section","text":{"type":"mrkdwn","text":"Deployment complete."}}] | 
Outputs¶
| Field | Type | Description | Example | 
|---|---|---|---|
| status | STRING | The posted message text returned by Slack. For Block Kit, this is the generated fallback text. | Hello from Salt AI! | 
| response | STRING | Raw Slack API response as a JSON string. | {"ok": true, "channel": "C0123456789", "ts": "1734479286.246919", ...} | 
| thread_timestamp | STRING | Timestamp of the created or replied-to message. Use this to continue the thread. | 1734479286.246919 | 
Important Notes¶
- A valid Slack Bot token is required. Create and install a Slack app to obtain it.
- If channel is a user ID (starts with U), the node opens a DM channel automatically before posting.
- If block_kit_json is provided, it must be a JSON array of blocks; the message input is ignored.
- The node generates a plain-text fallback from Block Kit content to maximize compatibility.
- Using icon_emoji or icon_url requires the chat:write.customize scope on your bot.
- To reply in a thread, pass a valid thread_timestamp from a prior message.
- The node returns the message text, full API response, and the message timestamp for downstream use.
Troubleshooting¶
- Invalid token error: Ensure slack_token is correct and the app is installed to the workspace.
- channel_not_found or not_in_channel: Verify the channel exists and the bot has access or has been invited.
- Invalid Block Kit JSON: Provide a valid JSON array of blocks; validate with Slack's Block Kit builder.
- DM resolution failed: If passing a user ID, ensure the user ID is correct and the bot has permission to open DMs.
- Permission errors (e.g., chat:write.customize): Add required scopes to the Slack app and reinstall it.
- Message not threaded: Ensure thread_timestamp is a valid Slack message ts from the target channel.
- Timeouts: Increase the hidden timeout input or check network connectivity.