Skip to main content

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​

InputTypeDescriptionDefault
SetEventTriggers the clearing of all workflow variables.-

Outputs​

OutputTypeDescription
DoneEventFires 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.

Irreversible Operation

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:

  1. Start the loop with a Loop or For Each node
  2. Use Set Variable nodes to store temporary processing data for the current item
  3. Connect the processing logic to the Clear All Variables node's Set input
  4. 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.