Overview
The node processes text data from input items by applying one of several transformations or analyses. It is useful for scenarios where you need to manipulate or analyze textual content within your workflow, such as formatting user input, preparing data for further processing, or extracting simple metrics.
Practical examples include:
- Converting product descriptions to uppercase for consistent display.
- Reversing strings for encoding or obfuscation purposes.
- Counting characters in a text field to validate input length.
Properties
| Name | Meaning |
|---|---|
| Text Field | The name of the field in the input JSON that contains the text to be processed. |
| Output Field | The name of the field where the processed result will be stored in the output JSON item. |
The node supports the following operations (selected via the "Operation" property):
- Uppercase: Convert text to uppercase letters.
- Lowercase: Convert text to lowercase letters.
- Reverse: Reverse the order of characters in the text.
- Count Characters: Count the number of characters in the text.
Output
Each output item contains the original input JSON fields plus an additional field (as specified by the "Output Field" property) holding the result of the selected operation:
- For Uppercase, Lowercase, and Reverse operations, the output field contains the transformed string.
- For Count Characters, the output field contains a numeric value representing the character count.
If the node encounters an error on an item and is configured to continue on failure, the output item will include an error field describing the issue.
Dependencies
- No external services or API keys are required.
- The node relies solely on built-in JavaScript string methods.
- No special environment variables or n8n configurations are necessary.
Troubleshooting
Error: The specified text field does not contain text
This occurs if the input field specified in "Text Field" is missing or its value is not a string. Ensure the field exists and contains valid text.Error: Unknown operation
This indicates an invalid operation was selected. Verify that the operation is one of the supported options: uppercase, lowercase, reverse, or count.If the node fails on some items but continues on others, check the "Continue On Fail" setting to control this behavior.