Send to Slack
Use this node to post a message to a Slack channel or user — for example, notifying a DevOps channel when a server device goes offline, or sending a direct message to an on-call engineer when a critical alarm fires.
Configuration
Section titled “Configuration”- Message template — required. Content of the Slack message. Supports templatization — use
${metadataKey}and$[dataKey]to include dynamic values. - Use system Slack settings — when enabled, uses the Slack bot token configured at the system level. When disabled, specify the Bot token directly in this node.
- Bot token — Slack API bot token (required when system settings are disabled).
- Conversation type —
PUBLIC_CHANNEL,PRIVATE_CHANNEL, orDIRECT. - Conversation — target Slack channel or user (identified by Slack ID/name).
Message processing algorithm
Section titled “Message processing algorithm”- Resolve the message content from the template using incoming message data and metadata.
- Post the message to the configured Slack conversation via the Slack API.
- Route via
Successon delivery. Message data and metadata are not modified. - Route via
Failureon unexpected error.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Message posted to Slack successfully. |
Failure | Invalid token, Slack API error, or unexpected error. |
Examples
Section titled “Examples”Example 1 — Post device alert to a channel
Section titled “Example 1 — Post device alert to a channel”Metadata: { "deviceName": "Gateway-01", "alarmType": "Connection Lost" }.
{ "messageTemplate": "Alert: ${alarmType} on device ${deviceName}", "useSystemSettings": true, "conversationType": "PUBLIC_CHANNEL", "conversation": { "id": "C12345678", "name": "alerts", "type": "PUBLIC_CHANNEL" }}Result: "Alert: Connection Lost on device Gateway-01" posted to the #alerts channel. Routes via Success.
JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbSendToSlackNodeConfiguration", "type": "object", "required": ["messageTemplate"], "additionalProperties": false, "properties": { "messageTemplate": { "type": "string" }, "useSystemSettings": { "type": "boolean" }, "botToken": { "type": "string" }, "conversationType": { "type": "string", "enum": ["PUBLIC_CHANNEL", "PRIVATE_CHANNEL", "DIRECT"] }, "conversation": { "type": "object" } }}