Transform
The Transform action connector helps in manipulating texts and numbers as required. It helps you to manipulate and structure data according to our needs.
For example, suppose in the previous trigger specific data is selected to be displayed. In that case, the action defined by the Transform connector can manipulate or change it to meet your display requirements.
Set Up the Transform modifiers
Perform the following steps to set up the Transform action connector:
- Click Configure Action Step from the left navigation panel.
- Click Action Step to configure third-party services.
- Within the Configure Action Step, click the Transform connector.
- Under Choose an Action tab, select the Transform action.
- On the Configure Action page, enter the following details:
- Click the Add Input button, and enter a variable name for the Input Name (say, “name”) and an Input Value for the variable (say, “john” in lowercase letters).
Note: You can even pass the value directly into the Transformation box.
- Let’s enter the JSON code that uses the “capitalize()” modifier in the Transformation box. Use the following code: {“result” : “{capitalize(name)}” }
- Click the Add Input button, and enter a variable name for the Input Name (say, “name”) and an Input Value for the variable (say, “john” in lowercase letters).
- Click Proceed.
- You will see the input values which you have configured in the Configure Action modal.
- Check if the details are correct. If yes, click Test Action.
- Once set, click Save and Exit.
This sets up the Transform action connector.
Transform Modifiers
Transform modifiers help in manipulating texts and numbers as per our needs. This function utilizes JSON code and modifiers to transform data.
The Transform connector also helps in mapping different JSON objects into one object, as seen in the sample transform input data:
{
"first_name" : "{user_first}",
"last_name" : "{user_last}",
"full_name" : "{join(user_first,user_last,' ')}",
"country" : "india",
"time" : "{now('toISO')}"
}
The Transform function has specific modifiers that can manipulate the data. Let’s look at the applicable transform modifiers in detail.
truncate
Use this modifier to reduce the length of a string to a specific number of characters or words using ellipses or word-break options.
Note: The boolean value (true, false) implies whether you want to break the word or not. True means you want to break the word, and false means not. The space after the word is considered a break.
Example: truncate (string,number of characters,'ending string', ‘word break’)
Note: If the limit for the number of characters is more than that of the string, the output will contain the complete string without ellipses.
Here’s a screenshot that shows the input:

Here’s a screenshot that shows the output:

Here’s a screenshot that shows the input when the word break is set to true by default.

Here’s a screenshot that shows the output:

Note: In the truncate modifier, string and the number of characters are the two mandatory fields. If we do not specify the ending string, it would take the ellipses (...) or any other characters the user enters such as (***).
Here’s a screenshot that shows the input when the limit for the number of characters is greater than that of the string irrespective of the work break value(true/false).

Here’s a screenshot that shows the output:

replace
Use this modifier to replace any character, word, or string given in the 2nd argument with the 3rd argument.
Example: replace(data, 'one char, one word or string', 'with this string')
Note: The replace modifier can only replace the first occurrence of a character/word/string.
Here’s a screenshot that shows the input:

Here’s a screenshot that shows the output:

You can also pass the data configured from the previous step and replace the content. Here is an example:
- Configure your HTTP Trigger and use the trigger data in the input value field.
- To replace the word Hello with Hi.
Here’s a screenshot that shows the output:
replaceAll
Use this modifier to replace all the characters, words, or strings given in the 2nd argument with the 3rd argument.
Example: replaceAll(data, 'one char, one word or string', 'with this string')
Note: The replaceAll modifier will replace multiple occurrences of a character/word/string with the same pattern.
Here’s a screenshot that shows the input:

Here’s a screenshot that shows the output:

You can also pass the data configured from the previous step and replace the content. Here is an example:
- Configure your HTTP Trigger and use the trigger data in the input value field.
- To replace all the occurrences of the word hello with hi.
Here’s a screenshot that shows the output:
trim
Use this modifier to remove white spaces at the beginning and end of the string, including tab, space, null byte, new line, and carriage return.
Example: trim(data)Here’s a screenshot that shows the input:
Here’s a screenshot that shows the output:
capitalize
Use this modifier to convert the input data into the capital (upper) case.
Example: capitalize('input data') or capitalize(variable)Here’s a screenshot that shows the output:
camelCase
Use this modifier to convert the input text into the camel case.
Example: camelCase('input data')Here’s a screenshot that shows the output:
kebabCase
Use this modifier to convert the input text into the kebab case.
Example: kebabCase('input data')Here’s a screenshot that shows the output:
snakeCase
Use this modifier to convert the input text into the snake case.
Example: snakeCase('input data')Here’s a screenshot that shows the output:
escape
Use this modifier to escape HTML characters.
Example: escape('<data input>')Here’s a screenshot that shows the output:
split
Use this modifier to split the text into an array.
Example: split('data-input' , '-')Here’s a screenshot that shows the output:
join
Use this modifier to join all items of an array to make a single string.
Example: join(…arrayRef|string , '-')Here’s a screenshot that shows the input:
Here’s a screenshot that shows the output:
number
Use this modifier to convert text into numbers.
Example: number('3')Here’s a screenshot that shows the output:
sum
Use this modifier to perform the addition of all numbers.
Example: sum(5,10,2)Here’s a screenshot that shows the output:
random
Use this modifier to generate random numbers from a specified range.
Example: random(1, 50)Here’s a screenshot that shows the output:
max
Use this modifier to retrieve the largest number from an array.
Example:max(arrayRef)Here’s a screenshot that shows the input:
Here’s a screenshot that shows the output:
min
Use this modifier to retrieve the smallest number from an array.
Example: min(arrayRef)Here’s a screenshot that shows the input:
Here’s a screenshot that shows the output:
upperCase
Use this modifier to convert the input text into upper case.
Example: upperCase('hello world')Here’s a screenshot that shows the output:
lowerCase
Use this modifier to convert the input text into lower case.
Example: lowerCase('Hello World')Here’s a screenshot that shows the output:
text
Use this modifier to convert numbers to the text type, i.e., this modifier typecasts data which means that the data type gets changed to string.
Example: text(3)Here’s a screenshot that shows the output:
uniqueItems
Use this modifier to remove duplicate items and return unique values from an array.
Example: uniqueItems(arrayRef)Here’s a screenshot that shows the output:
findInCollection
Use this modifier to return objects from an array specified in the conditions.
Example: findInCollection(collectionRef, 'name=bob&type=author')Here’s a screenshot that shows the input:
Here’s a screenshot that shows the output:
filterCollection
Use this modifier to filter an array and remove all objects which do not match the condition.
Example: filterCollection(collectionRef, 'name=Rahul')Here’s a screenshot that shows the output:
mapCollection
Use this modifier to map the collection data. This function will help users create a new collection by mapping data to different keys.
Example: { "userslist": "{mapCollection(users,'email_id=email&job=occupation')}" }Here’s a screenshot that shows the output:
size
Use this modifier to retrieve the size of an array.
Example: size(...arrayRef)Here’s a screenshot that shows the output:
now
Use this modifier to retrieve the current timestamp.
Example: now('toISO')
Options: toISO | toDate | toGMT | toUTC | toTimeHere’s a screenshot that shows the output:
uuid
Use this modifier to retrieve the unique ID based on UUID v4.
Example:
uuid()
{ "uuid" : "{uuid()}"}Here’s a screenshot that shows the output:
Using Multiple Filters
You can also pass data in for more than one filter, as shown below:
{
“name”: “{lowerCase(firstname)|upperCase($pipe)}”
}Here’s a screenshot that shows the output: