Skip to main content

Working with Nodes

Learn how to add, configure, and connect nodes to build automation workflows

Nodes are the building blocks of EdgeFlow automation. Each node performs a specific task, and by connecting them together, you create powerful automation workflows.

Node Anatomy

Understanding the parts of a node helps you work with them effectively:

Input Port
ƒ
Transform Data function
Output Port
1 Input Port - Receives messages from other nodes
2 Node Icon - Visual indicator of node type
3 Node Name - Custom label you assign
4 Node Type - The type of node (function, inject, etc.)
5 Status Indicator - Shows node state (running, error)
6 Output Port - Sends messages to connected nodes

Node Categories

EdgeFlow organizes nodes into categories based on their function:

📥

Input Nodes

Start your flows by generating or receiving data.

inject Manually trigger or schedule message injection
schedule Trigger based on cron expressions
mqtt in Subscribe to MQTT topics
http in Receive HTTP webhooks
gpio in Read GPIO pin state
📤

Output Nodes

Send data to external systems or display for debugging.

debug Output to debug panel
mqtt out Publish to MQTT topics
http response Send HTTP response
gpio out Write to GPIO pin
⚙️

Function Nodes

Process and transform data as it flows through.

function Execute custom JavaScript code
change Set, change, or delete message properties
template Generate text from templates
split Split arrays into individual messages
join Combine messages into arrays
🔀

Logic Nodes

Control flow routing and timing.

switch Route messages based on conditions
delay Delay or rate limit messages
trigger Create timed sequences
filter Filter messages by criteria

Adding Nodes to Your Flow

Method 1: Drag and Drop

1

Find the node in the Node Palette on the left

2

Click and hold on the node

3

Drag it onto the canvas

4

Release to place the node

Method 2: Quick Add Menu

Double-click anywhere on the canvas to open the Quick Add menu. Start typing to search for nodes, then press Enter or click to add.

ƒ function Function
📊 function-chart Dashboard

Method 3: Context Menu

Right-click on the canvas and select Add Node from the context menu. This opens the same Quick Add search.

Configuring Nodes

Every node has configurable properties that control its behavior. Double-click a node to open its configuration dialog.

Example: Function Node Configuration

⚙️ Configure Function Node
A name to identify this node in your flow
JavaScript
// Convert Celsius to Fahrenheit
const celsius = msg.payload;
msg.payload = (celsius * 9/5) + 32;
msg.unit = "fahrenheit";
return msg;
JavaScript code to process incoming messages
Number of output ports (for routing to multiple nodes)

Common Configuration Fields

Field Type Description Example
Name Custom label for the node "Read Temperature"
Text Input String values like URLs, topics MQTT topic: "sensors/temp"
Number Numeric values GPIO pin: 17
Select Choose from predefined options Pin mode: Input/Output
Code Editor JavaScript or expression code Function body
JSON Editor Complex object configuration HTTP headers
Cron Schedule expression "0 */5 * * * *"
Credential Sensitive data (encrypted) API keys, passwords

Connecting Nodes

Connections (wires) define how messages flow between nodes. Messages travel from output ports to input ports.

Creating Connections

Source
🖱️

Click and hold the output port (right side)

Source
🖱️

Drag toward the target node

Source
Target

Release on the input port (left side)

Multiple Outputs

Some nodes have multiple output ports for routing messages to different paths. The Switch node, for example, can have many outputs based on conditions.

Switch
temp > 30
temp > 20
otherwise
Alert
Log
Ignore

Fan-Out and Fan-In

Fan-Out (One to Many)

One output can connect to multiple inputs. The message is copied to each.

Source
A
B
C

Fan-In (Many to One)

Multiple outputs can connect to one input. Messages are processed in order.

A
B
C
Target

Node Status Indicators

Nodes display status indicators to show their current state during execution.

Idle

Node is configured but not actively processing

Running

Node is actively processing messages

Success

Node completed processing (brief flash)

Error

Node encountered an error

Warning

Node has a configuration issue or non-critical error

Understanding Messages

Nodes communicate by passing message objects. Understanding the message structure is key to building effective flows.

Message Object Structure

{
  // Primary data - can be any type
  "payload": 23.5,

  // Message category/routing key
  "topic": "sensors/temperature",

  // Unique message identifier (auto-generated)
  "_msgid": "a1b2c3d4.e5f6g7",

  // You can add any custom properties
  "sensor": "DHT22",
  "location": "living-room",
  "unit": "celsius",
  "timestamp": 1706745600000
}

Common Message Properties

Property Type Description
msg.payload any Primary data carried by the message
msg.topic string Category or routing key
msg._msgid string Unique identifier (auto-generated)
msg.req object HTTP request object (http-in node)
msg.res object HTTP response object (http-in node)

Best Practices

🏷️

Name Your Nodes

Give nodes descriptive names that explain their purpose. "Read Kitchen Temp" is better than "gpio in 1".

🔍

Use Debug Nodes

Add debug nodes at key points to inspect message flow during development.

📝

Add Comments

Use comment nodes to document complex logic for future reference.

🧹

Keep Flows Clean

Organize nodes logically. Use consistent spacing and alignment.

⚠️

Handle Errors

Add catch nodes to handle errors gracefully in production flows.

🔄

Test Incrementally

Build and test your flow piece by piece, not all at once.