All nodes/Data/Values & State

Constant

Static value (string, number, boolean). Computed once at workflow start and passes the value to other nodes via a data port. Has no exec_in/exec_out.

Constant
Value

Type in the graph: const

Try it

A fixed signature under the reply

The constant reaches the template through a custom input port.

Entry
Constant
Template
Exit
  • Execute + Data
  • Data
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

Runs as pasted

When to use it

A constant keeps a value that does not change from run to run visible on the canvas: a signature, a comparison threshold, a folder id, a fixed test payload. The same value can be typed straight into the consuming node’s field — you reach for a constant when several nodes need it, or when you would rather see and edit it on the diagram than in three separate config dialogs.

The second use is typing. A constant emits the type you pick: Integer, Float, Boolean, JSON, CSV or DataFrame. Template cannot do that — it always returns a string. And if the value has to change while the workflow runs, you want Variable instead.

How it works

A constant has no execution ports, only a data output. It does not take a place in the chain of steps: the value is produced the moment a consumer asks for it, and is not recomputed again for the rest of the run.

Where it plugs in is up to the consumer. Math has A and B; most nodes have named data ports. When there is no suitable port, open the node’s settings, the “Inputs” tab, the “Custom Inputs” section, and add one: the template can then read it as {{ inputs.port_name }}. That is how the example above is wired.

Common mistakes

  • A constant starts nothing. Its edge does not activate the receiving node. If the only incoming edge of a node comes from a constant, that node never runs — the trigger has to come from Entry or from a previous step.
  • Values are not coerced by force. When the text cannot be parsed as the chosen type (12 pcs with type Integer, malformed JSON), the node does not fail: what you typed travels downstream as a string. The error surfaces at the consumer and looks like the consumer’s bug.
  • An empty field is an empty string, not zero. With a numeric type an empty value arrives downstream empty.
  • Jinja does not run here. The constant’s text is passed through literally, {{ ... }} stays as written. Use Template for substitutions.

Inputs

Outputs

PortWirePayloadNotes
ValueoutputDatadataobject

Configuration

FieldTypeDefaultDescription
Valuevalueany""

Constant value. For scalar types (string/integer/float/boolean) the editor sends a string. For ``json`` / ``csv`` / ``dataframe`` it may send a dict or list.

Typevalue_typestringstring

Type of constant value

Options: string — String, integer — Integer, float — Float, boolean — Boolean, json — JSON, csv — CSV (text), dataframe — DataFrame (table)