Clear All Variables
Controlled node
Overview
The Clear All Variables node removes all variables from the workflow's global variable store. This is useful for resetting workflow state between processing stages, cleaning up temporary data, or ensuring a clean slate when running iterative processes.
Variables in Intellectible persist across node executions within a single workflow run. While this persistence is powerful for passing data between nodes, there are cases where you need to explicitly clear all variables to prevent data leakage or contamination between workflow phases.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Set | Event | Triggers the clearing of all workflow variables. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires after all variables have been successfully cleared from the workflow. |
Runtime Behavior
When the Set event is triggered, this node immediately clears the entire variable store (rootWorkflow.variables). This operation affects all variables previously set by Set Variable nodes, including both local and global variables.
This operation cannot be undone. Once variables are cleared, they cannot be recovered unless they were previously saved to external storage (such as a database, file, or cache).
Example
Resetting State Between Processing Loops
In a workflow that processes items in a loop using the For Each or Loop nodes, you might want to clear temporary variables between iterations:
- Start the loop with a Loop or For Each node
- Use Set Variable nodes to store temporary processing data for the current item
- Connect the processing logic to the Clear All Variables node's Set input
- Connect the Clear All Variables node's Done event to the next iteration or to the loop's completion
This pattern ensures that variables from one iteration don't accidentally influence the next iteration, maintaining clean state throughout the workflow execution.