Overview
The Text Transformer node performs various text transformations on input data fields. It supports operations such as converting text to upper case, lower case, trimming spaces, counting words, and generating URL-friendly slugs. This node is useful for standardizing text data, preparing strings for URLs, or extracting word counts for analysis.
Use Case Examples
- Convert product names to lower case for consistent database entries.
- Trim extra spaces from user input fields before saving.
- Generate slugs from article titles for SEO-friendly URLs.
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
- Uses n8n workflow utilities for error handling and node parameter retrieval.
Troubleshooting
Error 'No data found for field ""' occurs if the specified source field does not exist in the input data. Ensure the 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 parameter is one of the supported options: toUpperCase, toLowerCase, trim, countWords, generateSlug.
- If the node fails on some items but continueOnFail is enabled, errors are returned in the output JSON under the 'error' key for those items.