All nodes/Data/Operators
Math
Math operation over two values (A and B): addition, subtraction, multiplication, division, modulo, power. Inputs are connected via the data ports a and b.
Type in the graph: math_op
Exec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working workflow
- Execute + Data
Runs as pasted
When to use it
One arithmetic action over two values: a sum, a counter bump, a modulo for alternating behaviour, a price conversion. A formula longer than a single action is not worth building as a chain — three or four nodes in a row read worse than one JavaScript Code node with the same formula on one line.
How it works
Operands arrive on the “A” and “B” ports. The “Input” port triggers the step and, when one of
the operands is not wired, fills it in: a two-element array [a, b] or an object
{"a": …, "b": …} supplies whatever did not come in over its own port.
Numbers in text form are coerced, so "3" and 3 compute alike. Whole numbers stay whole —
except for division, which always yields a fractional result: 4 ÷ 2 returns 2.0.
Common mistakes
- A missing operand is an error, not a zero. The node will not compute
0 + 0: an unconnected “A” or “B” stops the step with a clear message. A plausible-looking wrong number is worse than a stopped run. - Non-numeric values and division by zero fail the step. If the run has to continue, enable the error output in the node’s settings and route it down its own path.
- A decimal comma is not a number.
3,5cannot be coerced; use a dot. - There is no rounding here. Division returns the full fraction; format the result further down — in a Template, for instance.
- Constants and variables trigger nothing. If “A” and “B” come only from those and nothing reaches “Input”, the step is skipped with the reason “Nothing could trigger it: no incoming link”.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Inputinput | Execute + Dataexecute_data | — | Run trigger and operands: a 2-element array [a, b] or an object {"a": …, "b": …} fills whichever of A/B is not wired directly. |
Aa | Datadata | — | First operand |
Bb | Datadata | — | Second operand |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Resultoutput | Execute + Dataexecute_data | object |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Operationoperation | string | + | Options: |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.