Was this article helpful?
Thanks for your feedback
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.
Perform the following steps to set up the Transform action connector:
Note: You can even pass the value directly into the Transformation box.
{“result” : “{capitalize(name)}” }
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.
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:
Use this modifier to convert the input text into the camel case.
Example: camelCase('input data')
Here’s a screenshot that shows the output:
Use this modifier to convert the input text into the kebab case.
Example: kebabCase('input data')
Here’s a screenshot that shows the output:
Use this modifier to convert the input text into the snake case.
Example: snakeCase('input data')
Here’s a screenshot that shows the output:
Use this modifier to escape HTML characters.
Example: escape('<data input>')
Here’s a screenshot that shows the output:
Use this modifier to split the text into an array.
Example: split('data-input' , '-')
Here’s a screenshot that shows the output:
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 input and output:
Use this modifier to convert text into numbers.
Example: number('3')
Here’s a screenshot that shows the output:
Use this modifier to perform the addition of all numbers.
Example: sum(5,10,2)
Here’s a screenshot that shows the output:
Use this modifier to generate random numbers from a specified range.
Example: random(1, 50)
Here’s a screenshot that shows the output:
Use this modifier to retrieve the largest number from an array.
Example: max(arrayRef)
Here’s a screenshot that shows the output:
Use this modifier to retrieve the smallest number from an array.
Example: min(arrayRef)
Here’s a screenshot that shows the output:
Use this modifier to convert the input text into upper case.
Example: upperCase('hello world')
Here’s a screenshot that shows the output:
Use this modifier to convert the input text into lower case.
Example: lowerCase('Hello World')
Here’s a screenshot that shows the output:
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:
Use this modifier to remove duplicate items from an array.
Example: uniqueItems(arrayRef)
Here’s a screenshot that shows the input:
Here’s a screenshot that shows the output:
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:
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:
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:
Use this modifier to retrieve the size of an array.
Example: size(...arrayRef)
Here’s a screenshot that shows the output:
Use this modifier to retrieve the current timestamp.
Example: now('toISO')
Options: toISO | toDate | toGMT | toUTC | toTime
Here’s a screenshot that shows the output:
Use this modifier to retrieve the unique ID based on UUID v4.
Example:
uuid()
{ "uuid" : "{uuid()}"}
Here’s a screenshot that shows the output:
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:
This sets up the Transform action connector
Was this article helpful?
Thanks for your feedback