Skip to main content

Modifier node

Modifier node allows you to convert user input into a specific format before passing it to a database, an API, or displaying it to the user.

For example, if a user enters "hello" and you want to display or store it in uppercase for consistency, the Modifier node can convert "hello" to "HELLO".

This node is useful when you need to standardize data formats for backend processing or display purposes.

You can transform the input in various ways by selecting options such as:

Option(s)DescriptionOutput typeSample inputSample output
Capitalize 1st letterCapitalizes the first letter of the inputStringi am aakankshaI am aakanksha
Capitalize 1st char of wordCapitalizes the first character of the inputStringhi aakankshaHi Aakanksha
Lower case allConverts all the letters of the input to lower caseStringHi AakanKshahi aakanksha
Upper case allConverts all the letters of the input to upper caseStringHi AakanKshaHI AAKANKSHA
Clean InputCleans the input off extra charactersStringvidyadhār nāgār,jaĭpŭrvidhyadhar nagar, jaipur
Add on both sidesAdds a character on both sides of the input (The length should be lesser than teh defined length)StringAkku (x = - , y = 6)-Akku-
Add at endAdds a character at the end of the input (will be added if length is lesser than the defined length)StringAkku (x = - , y = 6)Akku--
Add at startPrefix the input with a character. (will be added if the length is lesser than the defined length)StringAkku (x = - , y = 6)--Akku
Replace firstReplaces the character entered in find preset with the character in replace preset at the prefix of the input.String[email protected] (x=.,y=[dot])abc@gmail[dot]com
Replace AllReplaces the character entered in find preset with the character in replace preset at any part of the input.String[email protected] (x=.,y=[dot])abc@gmail[dot]com
Remove from both sidesRemoves the specified character from both the sides of the input-Akku- (x=-)Akku
Remove from startRemoves the specified character from the prefix of the inputString-Akku- (x=-)Akku-
Remove from endRemoves the specified character from the suffix of the inputString-Akku- (x=-)-Akku
Limit lengthThe input length is restricted to the specified number in the length preset, and any additional characters beyond that are substituted with the character defined in the omission preset.Length limitAakanksha Jain (x=12)Aakanksha Ja...
SliceProvides the input between the set positionsArray[1,2,3,4,5] (2,4)3
Split by spaceSplits the input into arraysArraytree house["tree", "house"]
Split into wordsThe input is divided into individual words based on the character specified in the preset.Arraytreehouse ,["tree", "house"]
JoinJoin the input array with the character in presetString["My", "Name", "is", "Aakanksha"] (with = '-')My-Name-is-Aakanksha
Pick by positionPicks the word in the array in the specified positionString["My", "Name", "is", "Aakanksha"] (3)is
Get lengthReturns an array's lengthString[]"My", "Name", "is", "Aakanksha"]4
For eachApply modifier options on each element of the arraySelect modifier["My", "Name", "is", "Aakanksha"] (operation = Upper case all)["MY", "NAME", "IS", "AAKANKSHA"]

Configure Modifier node

Consider a scenario where you want to collect user feedback through chatbot and store it in a DB table in uppercase.

To configure Modifier node, follow these steps:

  1. Drag and drop the Modifier node to the workflow in the flow editor.

  2. Choose whether you want to modify a direct text input or a variable:

    • If you select Text, enter the text value that needs to be modified.
    • If you select Variable, choose the variable that holds the user's input.
  3. In Modify input section, select the modification type based on your requirements (for example, Capitalize 1st char of word, Capitalize 1st letter).

  4. Use the Store response in option to choose or create a variable that will store the modified input.

  5. To test how the node works, click the button at the top of the flow editor and enter your input to see the corresponding output.

Refer to the following GIF to see how this node works.