My Custom Node

Custom node for text transformation

Overview

This node performs simple text transformations on an input string. It supports operations such as converting text to uppercase, lowercase, or reversing the text. This node is useful in scenarios where you need to manipulate or format text data within an automation workflow, for example:

  • Formatting user input to a consistent case before saving to a database.
  • Reversing strings for encoding or obfuscation purposes.
  • Preparing text for display or further processing.

Properties

Name Meaning
Operation The type of text transformation to perform. Options: "To Uppercase", "To Lowercase", "Reverse Text".
Input Text The text string that will be transformed according to the selected operation.

Output

The node outputs an array of JSON objects, each containing:

  • result: The transformed text after applying the selected operation.
  • inputText: The original input text provided.
  • operation: The operation performed on the input text.

Example output JSON:

{
  "result": "txeT desreveR",
  "inputText": "Reversed Text",
  "operation": "reverseText"
}

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • The node relies solely on built-in JavaScript string methods.

Troubleshooting

  • Unsupported Operation Error: If an unsupported operation value is somehow passed, the node throws an error indicating the operation is not supported. Ensure the "Operation" property is set to one of the allowed options.
  • Empty Input Text: Providing an empty string as input will simply return an empty string as the result without errors.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if one item causes an error, returning the error message in the output JSON for that item.

Links and References

Discussion