Thanks to visit codestin.com
Credit goes to docs.sim.ai

Reference

Variables

The Variables block updates workflow variables while a run is in progress. Variables are workflow-scoped state you create once in the workflow's Variables panel; this block changes their values as the run proceeds. Read a variable from any block with <variable.name>.

Variables
Variable Assignments-
error

Configuration

Variable Assignments

A list of assignments, run in order. The right side is an expression that can reference earlier outputs and the variable's own current value:

customerEmail = <api.email>
retryCount     = <variable.retryCount> + 1
currentStatus  = "processing"

The variables must already exist in the workflow's Variables panel, where you set their initial values.

Outputs

Variables are global rather than block outputs: read them anywhere with <variable.name>, like <variable.retryCount>. Each variable you assign is also exposed on this block as <variables.name> if you want to reference it from the block directly.

Examples

Count retries

Each attempt bumps retryCount, and a Condition stops the loop after a few tries.

Hold config for the run

Profile fields are stored once, then read by later blocks with <variable.userTier> without fetching again.

Best Practices

  • Initialize variables first. Create them in the workflow's Variables panel before a Variables block sets them.
  • Track state across steps. Variables suit counters and status that several blocks read and update, including inside a Loop.
  • Name them clearly. Names are case-sensitive, so retryCount and RetryCount are different variables.
  • Assign from earlier outputs. Set a variable from any block output, like customerEmail = <api.email>.

Common Questions

No. Variables are workflow-scoped and persist only for a single run. Each new run starts from the initial values defined in the workflow's Variables panel.
Yes. All Variables blocks share one namespace, so a later block can overwrite a value set by an earlier one by using the same name.
Use <variable.name> in any input field, like <variable.retryCount> or <variable.customerEmail>.
Variables are primarily read globally with <variable.name>. Each assignment is also exposed on the Variables block itself as <variables.name>, so you can reference it from the block directly if you prefer.
Descriptive names in camelCase or snake_case. Names are case-sensitive, so be consistent.
Yes. Reference any earlier output in an assignment, such as customerEmail = <api.email>, or increment a counter from its current value.

On this page