Overview
The Text Transformer node processes text data from an input field and transforms it according to the selected operation. It supports operations such as converting text to upper case, lower case, trimming spaces, counting words, and generating slugs. This node is useful for text normalization, formatting, and analysis tasks in workflows, such as preparing data for display, cleaning input text, or generating URL-friendly slugs.
Use Case Examples
- Convert product names to upper case for consistent display.
- Trim extra spaces from user input fields.
- Count the number of words in a text field for analytics.
- Generate URL slugs from titles for web content management.
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
- Requires no external dependencies beyond n8n core.
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.