Overview
This node, named Text Transformer, 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. It is useful for data cleaning, formatting, and preparing text for web use, such as creating slugs for URLs from titles or names.
Use Case Examples
- Converting product names to lowercase for consistent database entries.
- Trimming extra spaces from user input fields.
- Counting words in a text field for analytics.
- Generating 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
- No external dependencies beyond n8n core modules.
Troubleshooting
- If the specified source field does not exist in the input data, the node throws an error indicating no data found for that field. Ensure the field name is correct and present in the input.
- If an unsupported operation is selected, the node throws an error indicating the operation is not supported. Verify the operation name is one of the supported options: toUpperCase, toLowerCase, trim, countWords, generateSlug.
- If the node is set to continue on fail, errors for individual items are captured in the output with an error message instead of stopping execution.