Skip to content

String Operations

Overview

The String Operations node performs a variety of string manipulation and analysis operations on an input string. This node enables workflows to process, modify, and analyse string data dynamically based on user-configured operations.


Purpose

Use this node to perform common string operations such as substring extraction, casing, replacements, regex replacements, splitting, and various string property evaluations within your automation workflows.


Inputs

InputTypeDescription
Input StringTextThe string to be processed.
OperationText (Picklist)The operation to perform. Supported operations: Substring, Contains, StartsWith, EndsWith, IndexOf, LastIndexOf, ToUpper, ToLower, Trim, TrimStart, TrimEnd, Replace, Split, Length, RegexReplace.

Additional Inputs by Operation

OperationAdditional Inputs RequiredDescription
SubstringStartIndex (int), Length (int, optional)Extracts a substring starting at StartIndex with optional Length.
Contains, StartsWith, EndsWith, IndexOf, LastIndexOfValue (string)The value to check against the input string.
ReplaceOldValue (string), NewValue (string)Replaces occurrences of OldValue with NewValue.
SplitSeparator (string)Splits the input string by the separator into an array.
RegexReplacePattern (string), Replacement (string)Performs regex replacement using the specified pattern and replacement string.

Outputs

Output Variable NameDescription
ResultContains the result of the string operation performed. The output type varies by operation (e.g. string, int, boolean, or list).

Execution Details

  1. Validation:

    • Validates presence of Input String and Operation inputs.
    • Validates required additional inputs for specific operations.
  2. Operation Execution:
    Performs the specified operation:

    • Substring: Extracts part of the string.
    • Contains, StartsWith, EndsWith: Returns boolean results.
    • IndexOf, LastIndexOf: Returns index position.
    • ToUpper, ToLower, Trim, TrimStart, TrimEnd: Returns modified string.
    • Replace: Replaces substrings.
    • Split: Returns a list of split strings.
    • Length: Returns string length.
    • RegexReplace: Performs regex replacement.
  3. Error Handling:

    • Returns failure if required inputs are missing or if an unsupported operation is specified.
    • Any unhandled exceptions result in node failure with the exception message.
  4. Data Cleanup:

    • Removes input keys from task data after processing to avoid downstream data pollution.

Example Use Cases

  • Extracting a file extension from a filename string.
  • Checking if an input string contains a specific keyword.
  • Converting user input to uppercase or lowercase before further processing.
  • Replacing placeholders in template strings with dynamic data.
  • Splitting comma-separated values into an array.
  • Performing regex clean-ups or reformatting.

Notes

⚠️ Important:

  • Ensure required additional inputs are provided based on the selected operation to avoid runtime failures.
  • Regex patterns must be valid .NET regular expressions.
  • The output type varies depending on operation. For example:
    • Contains: boolean
    • Length: integer
    • Split: list
    • Most other operations: string

Known Limitations

  • Does not support culture-specific string comparisons (uses ordinal comparison by default for IndexOf and LastIndexOf).
  • Splitting on multi-character separators may need to be tested for your specific data scenarios.

Tentech 2024