Documentation is being updated. Some sections may not reflect the latest features.
Looking for step-by-step guides? Explore Tutorials →

Set Variables Node

Define named variables for use in subsequent nodes.

Overview

The Set Variables node lets you create or update one or more named variables that become available to all downstream nodes in the flow. Use it to initialize values, store constants, or prepare data for later use.

Configuration

Click + to add a new variable assignment. Each entry has:

Field Description
Variable Name The name of the variable to create or update
Value The assigned value - a literal or a {{variable}} reference

Each row includes a trash icon for removal.

Example: Initialize Counters

Set up variables at the start of a workflow:

counter → 0
maxRetries → 3
status → "pending"

Example: Store API Configuration

Define reusable configuration values:

apiBaseUrl → https://api.example.com/v2
apiTimeout → 30
outputFormat → json

Example: Transform and Store

Combine values from previous nodes:

fullName → {{firstName}} {{lastName}}
greeting → Hello, {{firstName}}!
requestId → req-{{timestamp}}

Using Variables

Reference variables from previous nodes using {{variableName}} syntax:

userId → {{api_response.user.id}}
email → {{form_data.email}}
total → {{order.items.length}}

Best Practices

  • Use descriptive variable names that indicate their purpose
  • Initialize variables early in the workflow when possible
  • Use Set Variables to prepare data before passing it to Model nodes
  • Group related variables in a single Set Variables node for clarity
AI AssistantPowered by Ubex
Beta
Ask me anything about Ubex workflows, nodes, or the API.