Overview
The Set Variable action stores a value in a variable for use in later workflow steps. Use this to calculate values, transform data, or store intermediate results.
Configuration
Variable Name (Required)
Name for the variable. Must:
Start with a letter or underscore
Contain only letters, numbers, and underscores
Be unique within the workflow
Examples:
total_pricecustomer_full_namediscount_amount_temp_value
Value (Required)
Value to store. Supports:
Variables from previous steps
Functions and calculations
Text with variable interpolation
Nested expressions
Examples:
{sum(booking.price, booking.tax)}
{upper(customer.name)}
Hello {customer.name}
{formatDate(booking.date, 'Y-m-d')}Use Cases
Calculate totals or discounts
Format data for later use
Store intermediate calculations
Combine multiple values
Transform data formats
Examples
1. Calculate Total
Variable Name: total_price
Value: {sum(booking.price, booking.tax, booking.tip)}
2. Format Customer Name
Variable Name: full_name
Value: {upper(customer.name)}
3. Calculate Discount
Variable Name: discount
Value: {multiply(booking.price, 0.1)}
4. Combine Text
Variable Name: greeting
Value: Hello {customer.name}, your booking {booking.id} is confirmed.
5. Format Date
Variable Name: formatted_date
Value: {formatDate(booking.date, 'F j, Y')}
Using Variables
After setting a variable, use it in subsequent steps:
{total_price}
{full_name}
{discount}Best Practices
Use descriptive names - Make variable names clear
Validate calculations - Test math operations
Handle empty values - Use fallback values when needed
Reuse variables - Store frequently used values
