Scripts in Flow Nodes are written in JavaScript

Script Guide

There are two places to write scripts:

<aside> <img src="/icons/description_gray.svg" alt="/icons/description_gray.svg" width="40px" />

See the Scripts article

</aside>

Node

Nodes can be accessed via the node function: node("Circle 1") (in the current node folder)

To access all nodes in the flow write: self.rootNode.nodes, or for the nodes in the current folder: self.folderNode.nodes.

On a node you can access or edit the name via node.name.

There is also a type path to know exactly what node it is: node.typePath.

To access wire connections there is node.inlets and node.outlets. There are also functions to access an inlet or outlet like this: node.inlet("Value") or node.outlet("Value").

To access properties there is node.properties. There is also a function to access a property like this: node.property("Property").

Let

Let’s call inlet and outlet “Let”.

To access the name of a let write: let.name

To check if it’s connected to any wires write: let.isConnected

Inlet

On an inlet you can access the connected outlets (via the wires upstream) like this: inlet.connectedOutLets