I have a strange problem that the variable does not want to be saved in the Save to State action when I use it in Automations. I call the Action from the Loop and first I want to save something from {{data.xy}}, but it does not happen!
I just tested it with the code below (in the Save to State step):
const newUsername = {{data}}; // Get the string to append
const usernamesArray = {{state.usernames}}; // Get the current array of usernames
// Append the new username to the array
usernamesArray.push(newUsername);
// Return the updated array
return usernamesArray;
And I got both values appended to the initial value in the state variable after Loop step:
As State Variables are exist only in context of a single Automation run β you wonβt see the current value in the Builder interface. But during the Automation run the value will be available for steps via {{state.m_tid}}.