Overview
The Text Transformer node performs various text transformations on input data fields. It supports operations like converting text to upper or lower case, trimming spaces, counting words, and generating URL-friendly slugs. This node is useful for cleaning and formatting text data in workflows, such as preparing user input for storage, analysis, or display.
Use Case Examples
- Converting user comments to lowercase for uniformity.
- Trimming extra spaces from product descriptions.
- Counting words in a text field to analyze content length.
- Generating slugs from titles for URL paths.
Properties
| Name | Meaning |
|---|---|
| Source Field | The name of the input field containing the text to transform. |
| Destination Field | The name of the output field to put the transformed text. If left empty, the original field is replaced. |
Output
JSON
- The transformed text output, stored in the specified destination field or replacing the source field if destination is empty.
Dependencies
- No external dependencies; uses built-in JavaScript string methods.
Troubleshooting
Error 'No data found for field ""' occurs if the specified source field does not exist in the input data. Ensure the source field name is correct and present in the input.Error 'The operation "" is not supported!' occurs if an unsupported operation is selected. Verify the operation name is one of the supported options: toUpperCase, toLowerCase, trim, countWords, generateSlug.