Overview
The discord node sends messages to Discord servers using webhooks.
Perfect for community notifications, gaming server alerts, and real-time status updates with rich embeds.
Webhook
Integration
Embeds
Rich Content
Files
Attachments
Avatar
Custom
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| webhookUrl | string | - | Discord Webhook URL |
| username | string | "EdgeFlow" | Override webhook username |
| avatarUrl | string | - | Override avatar image URL |
| tts | boolean | false | Text-to-speech message |
Message Formats
Simple Message
{
"payload": "Hello Discord!"
} With Custom Avatar
{
"payload": "Server alert!",
"username": "Alert Bot",
"avatarUrl": "https://i.imgur.com/..."
} Example: Rich Embed Alert
Create beautiful Discord embeds for notifications.
// Function node: Build Discord embed
var temp = msg.payload.temperature;
var status = temp > 30 ? "Critical" : temp > 25 ? "Warning" : "Normal";
var color = temp > 30 ? 0xFF0000 : temp > 25 ? 0xFFAA00 : 0x00FF00;
msg.payload = {
content: temp > 30 ? "@here Temperature Alert!" : null,
embeds: [{
title: "🌡️ Temperature Report",
description: "Current readings from sensor network",
color: color,
fields: [
{
name: "Temperature",
value: temp + "°C",
inline: true
},
{
name: "Status",
value: status,
inline: true
},
{
name: "Device",
value: msg.payload.deviceId,
inline: true
}
],
thumbnail: {
url: "https://example.com/thermometer.png"
},
footer: {
text: "EdgeFlow Monitoring",
icon_url: "https://edgx.cloud/icon.png"
},
timestamp: new Date().toISOString()
}]
};
return msg; Common Embed Colors
Success
0x00FF00 Warning
0xFFAA00 Error
0xFF0000 Info
0x5865F2 Creating a Discord Webhook
1
Open Channel Settings
Right-click on the channel → Edit Channel → Integrations
2
Create Webhook
Click "Webhooks" → "New Webhook"
3
Configure Webhook
Set name and avatar (optional, can be overridden per message)
4
Copy Webhook URL
Click "Copy Webhook URL" and paste into EdgeFlow node
Multiple Embeds
Send up to 10 embeds in a single message.
// Function node: Multiple sensor readings
var sensors = msg.payload.sensors; // Array of sensor data
msg.payload = {
content: "📊 **Sensor Report**",
embeds: sensors.slice(0, 10).map(function(sensor) {
return {
title: sensor.name,
color: sensor.status === "ok" ? 0x00FF00 : 0xFF0000,
fields: [
{ name: "Value", value: sensor.value.toString(), inline: true },
{ name: "Unit", value: sensor.unit, inline: true }
],
inline: true
};
})
};
return msg;