Overview
The notification node displays popup alerts and toast messages.
Show alerts for critical events, success confirmations, warnings, or informational messages.
Supports different severity levels, auto-dismiss, and user acknowledgment.
Toast
Popup
Alert
Dialog
Auto
Dismiss
Sound
Optional
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| layout | string | "toast" | toast, alert, dialog |
| position | string | "top right" | Screen position |
| timeout | number | 5 | Auto-dismiss seconds (0 = no auto) |
| highlight | string | "blue" | Accent color |
| ok | string | "OK" | OK button label |
Notification Types
Success
Configuration saved successfully!
Warning
Temperature approaching threshold
Error
Connection to sensor lost!
Info
System update available
Example: Alert by Severity
// Function node: Format notification by type
var temp = msg.payload.temperature;
var type, message;
if (temp > 40) {
type = "error";
message = "CRITICAL: Temperature at " + temp + "°C!";
} else if (temp > 30) {
type = "warning";
message = "Warning: Temperature elevated (" + temp + "°C)";
} else {
type = "info";
message = "Temperature normal: " + temp + "°C";
}
msg.payload = message;
msg.highlight = type === "error" ? "red" :
type === "warning" ? "orange" : "green";
msg.timeout = type === "error" ? 0 : 5; // Errors don't auto-dismiss
return msg; Example: Confirmation Dialog
// Notification node configuration:
{
"layout": "dialog",
"ok": "Confirm",
"cancel": "Cancel",
"highlight": "blue"
}
// Input message:
msg.payload = "Are you sure you want to restart the device?";
// When user clicks OK, outputs:
{ "payload": true }
// When user clicks Cancel, outputs:
{ "payload": false }
// Use switch node to route based on response Position Options
top left
top center
top right
-
center
-
bottom left
bottom center
bottom right