Skip to main content

Set Variables Node - Define Flow Variables in ConvyAI Agentic Flow

Overview​

The Set Variables node defines one or more typed key-value variables in the flow context. The variables become the node's output and are accessible to all downstream nodes by referencing the node name.

Positioning​

The Set Variables node has one input and one output. It can be placed anywhere in the flow after a trigger node. Variables defined here are scoped to the current run and accessible to all downstream nodes.

Configuration​

For each variable, define:

FieldDescription
NameVariable name, unique within the node.
TypeOne of: string, number, boolean, object, array.
ValueThe value to assign. Static values or $ variable references to upstream node outputs are both supported.

Multiple variables can be defined in a single Set Variables node. The value is validated against the selected type at save time.

Referencing variables in downstream nodes​

Variables defined in this node are accessible from any downstream node using the standard node reference syntax:

$('<nodeName>').output.variableName

Where nodeName is the unique name of the Set Variables node in the canvas.

Example: A Set Variables node named extractedData with a variable customerId of type string:

$('extractedData').output.customerId

The node name is unique within the canvas and acts as the namespace for all variables it defines.

Key concepts​

TermDefinition
Flow variableA typed key-value pair defined in a Set Variables node and available in the flow execution context.