Skip to main content
The Transform node modifies a variable’s value using one of 12 built-in transformation types. It reads from an input variable, applies the transformation, and stores the result.

Behavior

  • Reads the value from the specified input variable
  • Applies the selected transformation with optional parameters
  • Stores the result in the result output variable
  • Routes to Success or Error based on the outcome

Configuration

ParameterTypeDefaultDescription
inputVariablestring""Variable to read the input value from
transformTypeenum"to_upper"Transformation to apply (see table below)
paramsobject{}Additional parameters specific to the transform type

Transform types

TypeDescriptionRelevant params
to_upperConvert to uppercase
to_lowerConvert to lowercase
trimRemove leading/trailing whitespace
replaceFind and replace textpattern, replacement
substringExtract a portion of the stringstartIndex, endIndex
splitSplit string into an arrayseparator
joinJoin array elements into a stringseparator
json_parseParse a JSON string into an object
json_stringifyConvert an object to a JSON string
number_formatFormat a number with decimal placesnumberFormat (0–5 decimal places)
date_formatFormat a date valuedateFormat (ISO, locale, timestamp)
regex_extractExtract text matching a regex patternpattern

Params reference

ParamTypeDescription
patternstringRegex pattern or search string (for replace, regex_extract)
replacementstringReplacement string (for replace)
separatorstringDelimiter (for split, join)
startIndexnumberStart index for substring
endIndexnumberEnd index for substring
dateFormatenumDate format: ISO, locale, timestamp
numberFormatnumberDecimal places (0–5) for number_format

Output handles

HandleDescription
SuccessTransformation completed successfully
ErrorTransformation failed (e.g., invalid input type)

Output variables

VariableTypeDescription
resultanyThe transformed value

Use cases

After Speech Input, use trim then to_lower to clean up the transcript before using it in a Condition node.
After an API Call, use json_parse to convert the response body string into an object, then use regex_extract to pull specific fields.
Use number_format with numberFormat: 2 to display an account balance as 1234.56 in a TTS message.