Overview
The slack node sends messages to Slack workspaces using webhooks or the Bot API.
Perfect for team notifications, DevOps alerts, and integrating IoT data into your workflow.
Webhook
Simple Setup
Blocks
Rich Messages
Threads
Organized
Files
Uploads
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| webhookUrl | string | - | Incoming Webhook URL |
| token | string | - | Bot OAuth token (for advanced features) |
| channel | string | - | Channel name or ID (with token) |
| username | string | "EdgeFlow" | Display name for messages |
| iconEmoji | string | ":robot_face:" | Emoji for bot avatar |
Message Formats
Simple Text
{
"payload": "Hello from EdgeFlow!"
} With Attachments
{
"text": "Alert",
"attachments": [{
"color": "#ff0000",
"title": "Temperature High",
"text": "Sensor 1: 85°C"
}]
} Example: Rich Alert with Block Kit
Create visually rich messages using Slack's Block Kit.
// Function node: Build Block Kit message
var temp = msg.payload.temperature;
var humidity = msg.payload.humidity;
var device = msg.payload.deviceId;
msg.payload = {
blocks: [
{
type: "header",
text: {
type: "plain_text",
text: "🌡️ Environment Alert",
emoji: true
}
},
{
type: "section",
fields: [
{
type: "mrkdwn",
text: "*Device:*
" + device
},
{
type: "mrkdwn",
text: "*Status:*
🔴 Critical"
},
{
type: "mrkdwn",
text: "*Temperature:*
" + temp + "°C"
},
{
type: "mrkdwn",
text: "*Humidity:*
" + humidity + "%"
}
]
},
{
type: "actions",
elements: [
{
type: "button",
text: { type: "plain_text", text: "View Dashboard" },
url: "https://edgeflow.local/dashboard"
},
{
type: "button",
text: { type: "plain_text", text: "Acknowledge" },
style: "primary",
action_id: "ack_alert"
}
]
},
{
type: "context",
elements: [
{
type: "mrkdwn",
text: "Sent via EdgeFlow at " + new Date().toISOString()
}
]
}
]
};
return msg; Setting Up Incoming Webhook
1
Go to Slack Apps
Visit api.slack.com/apps and create a new app
2
Enable Incoming Webhooks
In Features → Incoming Webhooks, toggle to "On"
3
Add to Workspace
Click "Add New Webhook to Workspace" and select a channel
4
Copy Webhook URL
Copy the URL and paste into your EdgeFlow node
Thread Replies
Reply to existing messages to create threads.
// Store the message timestamp from the first message
// Subsequent messages can reply to it
// First message output contains:
// msg.ts = "1234567890.123456"
// Reply to thread:
msg.thread_ts = flow.get("alertThreadTs");
msg.payload = "Update: Temperature now normal (25°C)";
return msg;