Send formatted messages to Slack channels and receive Slack events in your patterns.
Slack integrations in DRAGOPS follow the same pattern as every other service: outbound messages use HTTP Request, inbound events use On Webhook, and data transformation uses the standard JSON and object nodes. You can send simple text notifications, rich Block Kit messages, and respond to Slack events — all with nodes you already know.
The simplest way to send a message to a Slack channel is through an Incoming Webhook URL. Slack provides this URL when you create a Slack app with the Incoming Webhooks feature enabled.
For structured messages with sections, fields, buttons, and dividers, use Slack's Block Kit JSON format. You build the blocks as a JSON object and send it in the request body.
You can build the blocks object using multiple Set Property nodes, or assemble the JSON string directly with Format nodes. For complex Block Kit layouts, the Format approach is often more readable:
Use a Format node with the Block Kit JSON as the template, using {0}, {1}, etc. for dynamic values.
Wire the dynamic values (service name, status, timestamp) to the Format node's input pins.
The Format node's output is a JSON string ready to send as the HTTP Request body.
For more control (posting to different channels, threading, updating messages), use the Slack Web API instead of Incoming Webhooks. The Web API requires a Bot Token for authentication.
In your Slack app settings, go to OAuth & Permissions and add the chat:write scope.
Install the app to your workspace and copy the Bot User OAuth Token (starts with xoxb-).
Store the token in a DRAGOPS connection or secret.
Slack can send events to your DRAGOPS pattern when messages are posted, reactions are added, channels are created, and more. This uses Slack's Events API.
Store Slack webhook URLs in secrets. Incoming Webhook URLs are sensitive — anyone with the URL can post to your channel. Store the URL in a DRAGOPS secret rather than hardcoding it in the pattern.
Use Block Kit Builder. Slack provides a visual Block Kit Builder where you can design your message layout and copy the JSON. Use this to prototype your message format, then replicate it in your pattern with Set Property or Format nodes.
Handle Slack's 3-second timeout. When receiving Slack events, Slack expects a response within 3 seconds. If your pattern takes longer to process, use Respond To Webhook to send an immediate 200 response, then continue processing. Slack retries unacknowledged events, which can cause duplicate processing.
Avoid message loops. If your pattern listens for Slack messages and also posts to Slack, make sure it does not respond to its own messages. Check the event.bot_id field and skip processing when it matches your app's bot ID.
Rate limits apply. Slack's Web API has rate limits (typically 1 request per second per method per workspace). For high-volume patterns, add delays or queue mechanisms to stay within limits.