With the Save to State action, you can save temporary values to the state.
This is useful when, for example, you want to use the same value in multiple steps of your workflow.
To configure the action, first you need to create a variable to store the value you want to save or select one from the Variable dropdown if you've created it before. When creating a variable, make sure to select the proper variable type.
Then, you need to pass the data you want to save in the New value field. The saved value will be available as {{state.<key>}} in all actions and components.
Examples
Saving the result of the previous step
{{data}}
You can always adjust the data before saving it.
Saving values with JS Code action
state.varName = 'newValue';
// or using setValue method
state.setValue('varName', 'newValue');
Reading state values
const value = state.getValue('varName');
Resetting variables
Reset a variable to the initial value
state.resetValue('varName');
Reset all variables
// reset all variables, page and app state
state.resetValues();
// reset all page variables
state.resetValues('page');
// reset all app (global) variables
state.resetValues('app');