Slack Writer¶
Sends messages to Slack channels, users (DMs), or threads using a Slack Bot token. Supports plain-text messages and rich Block Kit payloads, auto-generating a fallback text for clients that cannot render blocks. Can customize bot icon via emoji or URL and reply in an existing thread.

Usage¶
Use this node to post notifications, updates, or interactive Block Kit messages into Slack from your workflow. Provide a Bot token, a target channel (channel name/ID or user ID for DM), and either plain text or a Block Kit JSON payload. Optionally reply within a thread using a timestamp and customize the bot appearance.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| slack_token | True | PASSWORD | Slack Bot authentication token used to authorize API requests. | |
| channel | True | STRING | Destination in Slack. Accepts a channel name (e.g., #general), a channel ID (e.g., C05NNPR6A42), or a user ID (e.g., U031AFC238B) to open a DM. | #general |
| icon_emoji | False | STRING | Emoji to use as the bot icon (requires chat:write.customize). | :robot_face: |
| icon_url | False | STRING | Direct URL to a bot icon image (512×512 or smaller) (requires chat:write.customize). | https://example.com/bot-icon.png |
| thread_timestamp | False | STRING | Slack message timestamp to reply in a thread. When provided, the message is posted as a thread reply. | 1734479286.246919 |
| message | False | STRING | Plain text content of the message. Ignored if block_kit_json is provided. | Hello from Salt AI! |
| block_kit_json | False | STRING | A JSON array of Block Kit blocks for rich message content. If provided, it overrides the plain-text message and a fallback text is auto-generated from the blocks. | [{"type":"section","text":{"type":"mrkdwn","text":"Hello from Salt AI!"}}] |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| status | STRING | The final text Slack registered for the posted message (plain text or fallback from blocks). | Hello from Salt AI! |
| response | STRING | Raw Slack API response serialized as JSON for debugging or downstream use. | {"ok": true, "channel": "C05NNPR6A42", "ts": "1734479286.246919", "message": {"text": "Hello from Salt AI!"}} |
| thread_timestamp | STRING | The timestamp of the posted message (ts), useful for threading subsequent replies. | 1734479286.246919 |
Important Notes¶
- Block Kit precedence: If block_kit_json is provided, it overrides the message input. A fallback text is generated by extracting text fields from the blocks.
- DM handling: Supplying a user ID (starting with 'U') will automatically open a DM and post the message there.
- Thread replies: Provide a valid thread_timestamp (ts) to post as a reply in a thread.
- Icon customization: Using icon_emoji or icon_url requires the chat:write.customize permission on your bot.
- Block Kit format: The block_kit_json must be a JSON array of valid Block Kit blocks.
- Token safety: Errors will redact your token in logs; always use a bot token with appropriate scopes.
- Channel access: The bot must be in the target channel or have permission to DM the user.
Troubleshooting¶
- Invalid Block-Kit JSON: Ensure block_kit_json is valid JSON and a top-level array of blocks. Validate using Slack's Block Kit Builder.
- not_in_channel or channel_not_found: Invite the bot to the channel or verify the channel ID/name.
- invalid_auth or not_authed: Use a valid Slack Bot token and confirm required scopes (e.g., chat:write, chat:write.customize for icon overrides).
- thread_ts_invalid: Verify the thread_timestamp corresponds to an existing message's ts in the target channel.
- Cannot DM user: Confirm the user ID starts with 'U' and that the bot is allowed to initiate DMs; retry if conversations_open fails.
- rate_limited: Slack may rate limit requests. Add retries or backoff and reduce message frequency.
- Timeouts: Increase the hidden timeout value if requests are timing out due to network conditions.