Port Types

The 7 data types used by node ports, their colors, and connection rules.

Data Types

Every port on a node has a data type that determines what kind of data it sends or accepts. Port types are color-coded on the canvas so you can see at a glance which connections are valid.

Type Color Hex Description
string
Green
#8CD454 Text data of any length
number
Blue
#5999F2 Numeric values (integers and decimals)
boolean
Red
#E65966 True or false values
json
Yellow
#F2BF40 Structured JSON objects or arrays
any
Gray
#B3B3B3 Accepts any type (wildcard)
file
Purple
#CC80E6 File paths on the local filesystem
image
Orange
#F28C4D Image data (paths or binary)

Connection Rules

When you drag a connection wire from an outlet to an inlet, Watchflows checks whether the types are compatible. Incompatible connections are rejected and the wire snaps back.

Always Compatible

  • Same type to same type — a string outlet always connects to a string inlet.
  • any ports — an any port connects to every other type, in both directions.

Coercible Types

Some types can be automatically converted when connected. Watchflows handles the coercion at runtime:

From To Behavior
string
json
String is parsed as JSON
json
string
JSON is serialized to a string
number
string
Number is converted to its string representation
boolean
string
Boolean becomes "true" or "false"
file
string
File path is used as a plain string

Visual Guide

On the canvas, each port is drawn as a small circle with the color of its data type. Connection wires inherit the color of the source port, making it easy to trace data flow.

string
number
boolean
json
any
file
image