Skip to main content

String Operation


๐ŸŽฏ Purposeโ€‹

The String Operation node provides text manipulation capabilities for cleaning, formatting, and restructuring text data. It supports operations like joining arrays, splitting text, replacing content, extracting substrings, trimming whitespace, and changing case. This makes it a versatile utility node for preparing text data in automation workflows.

๐Ÿ“ฅ Inputsโ€‹

  • Text / Array Input (String or Array, Required): The text or array of text values from a previous node to be transformed.

๐Ÿ“ค Outputsโ€‹

  • Transformed Text: A new property containing the manipulated text according to the selected operation.
  • Structured Output: Can either include all original data plus the new property, or only the transformed text, depending on output settings.

โš™๏ธ Parametersโ€‹

NameTypeRequiredDefaultDescription
String OperationDropdownNoJoin (array to string)Operation to perform. Options: Join, Replace, Split, Substring, Trim, Upper case, Lower case.
Property NameStringYes(empty)Property containing the source text or array.
DelimiterStringNo(empty)Separator used when joining arrays into a single string.
FindStringNo(empty)The text pattern to find for replacement.
Replace ByStringNo(empty)The text to replace matches with.
Split DelimiterStringNo(empty)The delimiter used to split strings into arrays.
Substring StartNumberNo0Start index for substring extraction (0-based).
Substring EndNumberNo2End index for substring extraction (exclusive).
OptionDropdownNoOriginal with appended result columnControls output: keep original data with result, or return only the result.
Result Property NameStringNostring_resultName of the property containing the transformed text.

๐Ÿ’ก Example Usageโ€‹

Customer Data Standardizationโ€‹

  • Setup: Replace unwanted characters in phone_number and name result clean_phone_number.
  • Result: Standardized phone numbers (e.g., "1234567890").

Product Description Summariesโ€‹

  • Setup: Substring product_description from 0โ€“100 โ†’ short_description.
  • Result: Short previews for mobile app listings.

Email List Managementโ€‹

  • Setup: Split customer_tags by "," โ†’ tag_array.
  • Result: "premium,loyal,newsletter" โ†’ ["premium", "loyal", "newsletter"].

Address Formattingโ€‹

  • Setup: Join address parts array with ", " โ†’ formatted_address.
  • Result: "123 Main St, Springfield, IL 62701".

๐Ÿ“˜ Best Practicesโ€‹

  • Use Trim before other operations to clean unwanted whitespace.
  • Chain multiple String Operation nodes for complex transformations.
  • Prefer Return result column only if the original data is not needed downstream.
  • Always test delimiters and substring indices with sample data.
  • Use descriptive output names like clean_email, formatted_phone, short_title.

๐Ÿงช Test Casesโ€‹

  • Given: ["Alice", "Bob", "Charlie"] with Join, Delimiter = ", " โ†’
    Expected: "Alice, Bob, Charlie"
  • Given: "Hello World" with Replace, find = "World", Replace By = "Threo" โ†’
    Expected: "Hello Threo"
  • Given: "red,blue,green" with Split, delimiter = "," โ†’
    Expected: ["red", "blue", "green"]
  • Given: "ProductCode12345" with Substring, start = 0, end = 11 โ†’
    Expected: "ProductCode"
  • Given: " spaced text " with Trim โ†’
    Expected: "spaced text"