Skip to main content
Version: 1.5.x

Edit Variable

Adding Edit Variable Step

The Edit Variable function allows you to modify existing variables in your workflow. This is useful for updating variable values based on new data or user interactions, enabling more dynamic and adaptive workflows.


Steps to Add an Edit Variable Step

  1. Navigate to the Workflow Editor: Open the workflow where you want to edit an existing variable.
  2. Add an Edit Variable Step: Drag and drop the "Edit Variable" step from the side panel into your workflow sequence.
  3. Select the Variable to Edit: Choose the variable you wish to edit from the list of previously defined variables.
  4. Update the Variable Value: Enter a new value or modify the existing value using string literals, variables starting with data., or JavaScript expressions. For example:
    • 'Updated Value!' (string literal)
    • data.recipient.name (variable from updated data)
    • 'Welcome back, ' + data.recipient.name (concatenation using JavaScript)

Using Conditions with Edit Variable

Just like with the Define Variable step, you can set conditions for when the Edit Variable step should execute. This allows you to update variables only under specific circumstances, making your workflow more responsive and efficient.

tip

Utilize the Condition Builder to add conditions for the edit variable step, ensuring variables are updated under the right conditions.

Best Practices for Editing Variables

  • Validation: Ensure that the new values for variables are valid and within expected ranges or formats.
  • Logging Changes: Keep track of variable changes to help with debugging and workflow auditing.