Blocks & Flow EditorCommon

set variables

Set, change, delete, or move message properties during flow execution

The set variables block modifies message properties as the flow runs. Add one or more rules to set values, search-and-replace, delete properties, or move data between fields.

Bot Studio set variables block with rules configuration

Configuration

FieldDescription
NameOptional display label on the canvas.
RulesList of property operations applied in order. Click + to add a rule.

Rule actions

ActionDescription
SetAssign a value to a property (e.g. set msg.customerId to a string or expression).
ChangeSearch and replace within a property value. Supports regular expressions.
DeleteRemove a property from the message.
MoveMove a value from one property to another.

Rule fields (per rule)

FieldDescription
PropertyTarget property (e.g. msg.payload, msg.filePath). Scope: msg, flow, or global.
To valueValue to set — string, number, boolean, JSON, JSONata expression, or another property reference.
Search for / Replace with (Change)Find and replace text within the property. Enable Use regular expressions for pattern matching.
Deep copy valueWhen enabled, copies objects deeply instead of by reference.

Outputs

PortDescription
Output 1Message with all rules applied, passed to the next block

Notes

  • Rules run top to bottom — order matters when multiple rules touch the same property
  • Use msg.customField for values that must survive blocks that overwrite msg.payload
  • JSONata expressions allow computed values from existing message data
  • flow and global scope rules write to flow/global context, not just the current message