Using SetVariables node and the add operator

Managing stored values in automation.

As an example of using the SetVariables node, let's create a scenario where the outcome will be a variable containing an array.

To make the scenario work successfully, you need to add 4 node:

Notion image
  • (1) Trigger on Run once node to initiate a single scenario run immediately after clicking the Run Once button;
  • (2) An Iterator node , containing a sequence of values in the form of [1, 2, 3, 4, 5];
  • (3) A SetVariables node that assembles a variable, which is an array;
Notion image

When configuring the SetVariables node, it's important to correctly specify the variable assembly algorithm using the "add" operator:

  • The operand of the expression will automatically be the specified variable.
  • The value of the expression should be selected as the value of the Iterator node.
💡
With each iteration, the value of the variable specified in the SetVariables node is new and equal to an element of the array.
  • (4) A Webhook Response node that returns the specified variable.
Notion image

The outcome of the scenario will be an array of values:

Notion image
Did this answer your question?
😞
😐
🤩