String Operation Node - Synthreo Builder
String Operation node for Builder - apply text transformations including trim, replace, split, concatenate, upper/lower case, and regex substitution to string fields in a workflow.
Purpose
Section titled “Purpose”The String Operation node provides text manipulation capabilities for cleaning, formatting, and restructuring string data in a workflow. It supports a range of operations including joining arrays into a single string, splitting strings into arrays, replacing text patterns, extracting substrings, trimming whitespace, and converting case.
This node is commonly used to prepare text data before passing it to LLM nodes, API calls, storage, or reporting steps where a specific text format is required.
Inputs
Section titled “Inputs”- Text / Array Input (String or Array, Required) - The text string or array of text values from a previous node to be transformed. The field to transform is identified by the Property Name parameter.
Outputs
Section titled “Outputs”- Transformed Text - A new property containing the result of the selected operation.
- Structured Output - Depending on the selected Option, the output includes all original input fields plus the new property, or only the transformed result.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| String Operation | Dropdown | No | Join (array to string) | The operation to perform on the source text or array. See the Operations Reference section below for details on each option. |
| Property Name | String | Yes | (empty) | The name of the field in the incoming data that contains the source text or array to be transformed. |
| Delimiter | String | No | (empty) | The separator inserted between array elements when using the Join operation. For example, ", " produces comma-separated output. |
| Find | String | No | (empty) | The text pattern to search for when using the Replace operation. |
| Replace By | String | No | (empty) | The text that replaces each match found by Find when using the Replace operation. |
| Split Delimiter | String | No | (empty) | The character or string used to split the source text into an array when using the Split operation. |
| Substring Start | Number | No | 0 | The zero-based index of the first character to include when using the Substring operation. |
| Substring End | Number | No | 2 | The zero-based index at which extraction stops (exclusive) when using the Substring operation. The character at this index is not included in the result. |
| Option | Dropdown | No | Original with appended result column | Controls output structure. Original with appended result column retains all incoming data fields and adds the result as a new column. Return result column only outputs only the result field. |
| Result Property Name | String | No | string_result | The name of the output property that stores the transformed text. |
Operations Reference
Section titled “Operations Reference”Join (array to string)
Section titled “Join (array to string)”Combines an array of values into a single string, inserting Delimiter between each element.
- Required parameters: Property Name, Delimiter
- Input: Array of strings
- Output: Single concatenated string
Example: ["Alice", "Bob", "Charlie"] with delimiter ", " produces "Alice, Bob, Charlie".
Replace
Section titled “Replace”Finds all occurrences of the Find pattern within the source text and replaces each with the Replace By value. The replacement is case-sensitive and replaces all matches, not just the first.
- Required parameters: Property Name, Find, Replace By
- Input: String
- Output: String with replacements applied
Example: "Hello World" with Find "World" and Replace By "Synthreo" produces "Hello Synthreo".
Divides a string into an array of substrings at each occurrence of Split Delimiter.
- Required parameters: Property Name, Split Delimiter
- Input: String
- Output: Array of strings
Example: "red,blue,green" with Split Delimiter "," produces ["red", "blue", "green"].
Substring
Section titled “Substring”Extracts a portion of the source string starting at Substring Start (inclusive) and ending at Substring End (exclusive). Index values are zero-based.
- Required parameters: Property Name, Substring Start, Substring End
- Input: String
- Output: String (extracted portion)
Example: "ProductCode12345" with Start 0 and End 11 produces "ProductCode".
Removes leading and trailing whitespace from the source string. Does not affect whitespace within the string.
- Required parameters: Property Name
- Input: String
- Output: String with surrounding whitespace removed
Example: " spaced text " produces "spaced text".
Upper case
Section titled “Upper case”Converts all characters in the source string to uppercase.
- Required parameters: Property Name
- Input: String
- Output: Uppercase string
Example: "hello world" produces "HELLO WORLD".
Lower case
Section titled “Lower case”Converts all characters in the source string to lowercase.
- Required parameters: Property Name
- Input: String
- Output: Lowercase string
Example: "HELLO WORLD" produces "hello world".
Example Usage
Section titled “Example Usage”Customer Data Standardization
Section titled “Customer Data Standardization”Phone numbers received from a web form contain dashes and spaces. The Replace operation removes non-numeric characters to produce clean phone numbers for storage.
Setup:
String Operation: ReplaceProperty Name:phone_numberFind:-Replace By: (empty)Result Property Name:clean_phone_number
Result: "555-123-4567" becomes "5551234567".
Product Description Summaries
Section titled “Product Description Summaries”Product descriptions are too long for a mobile app listing card. The Substring operation extracts the first 100 characters for a preview.
Setup:
String Operation: SubstringProperty Name:product_descriptionSubstring Start: 0Substring End: 100Result Property Name:short_description
Result: Only the first 100 characters of the description are returned as short_description.
Email List Management
Section titled “Email List Management”Customer tag strings are stored as comma-separated values and need to be split into arrays for downstream filtering.
Setup:
String Operation: SplitProperty Name:customer_tagsSplit Delimiter:,Result Property Name:tag_array
Result: "premium,loyal,newsletter" becomes ["premium", "loyal", "newsletter"].
Address Formatting
Section titled “Address Formatting”Individual address component fields are joined into a single formatted address string.
Setup:
String Operation: JoinProperty Name:address_partsDelimiter:", "Result Property Name:formatted_address
Result: ["123 Main St", "Springfield", "IL 62701"] becomes "123 Main St, Springfield, IL 62701".
Best Practices
Section titled “Best Practices”- Trim before other operations: When working with data sourced from user input or external systems, use a Trim operation first to remove unexpected leading or trailing whitespace before applying Replace, Split, or Substring. Add a second String Operation node for the primary transformation if needed.
- Chain multiple nodes for complex transformations: Each String Operation node performs one operation. For multi-step text processing (such as trim, then replace, then uppercase), chain multiple String Operation nodes in sequence.
- Prefer Return result column only when the original is not needed downstream: This keeps the output lean and reduces confusion in downstream node configuration.
- Test delimiters and indices with real sample data: The exact characters in delimiters and the zero-based index behavior of Substring are common sources of off-by-one errors. Always test with representative data before deploying.
- Use descriptive output names: Name the result property to reflect the transformation and field purpose, such as
clean_email,formatted_phone,short_title, ortag_array. Avoid generic names likestring_resultin production workflows. - Case operations for normalization: Use Lower case or Upper case to standardize values before comparison operations in downstream Set Transformation or filter nodes.
Troubleshooting
Section titled “Troubleshooting”Replace operation does not change anything
Section titled “Replace operation does not change anything”Confirm that the Find value exactly matches the text in the source field, including case and whitespace. The Replace operation is case-sensitive. If you need case-insensitive replacement, normalize the case first using a Lower case or Upper case operation in a preceding node.
Substring returns fewer characters than expected
Section titled “Substring returns fewer characters than expected”Verify that the Substring End index is set correctly. Substring End is exclusive, meaning the character at that index is not included. For example, to extract characters at indices 0 through 10 inclusive, set Substring End to 11.
Split produces an array with one element
Section titled “Split produces an array with one element”If the Split Delimiter does not appear in the source string, the entire source string is returned as a single-element array. Confirm that the delimiter value matches the actual separator in the source data, including whether it includes spaces (e.g., ", " versus ",").
Join produces an empty string
Section titled “Join produces an empty string”If the source array is empty, the Join operation produces an empty string. Confirm that the upstream data is populating the array field referenced by Property Name.
Output property is missing in downstream nodes
Section titled “Output property is missing in downstream nodes”Confirm that Result Property Name is set correctly and that the Option is set to Original with appended result column if the downstream node expects both the original fields and the new result column.
Test Cases
Section titled “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,Split Delimiter = ","- Expected:["red", "blue", "green"] - Given:
"ProductCode12345"with Substring,Start = 0,End = 11- Expected:"ProductCode" - Given:
" spaced text "with Trim - Expected:"spaced text" - Given:
"hello world"with Upper case - Expected:"HELLO WORLD" - Given:
"HELLO WORLD"with Lower case - Expected:"hello world"
Related Nodes
Section titled “Related Nodes”- Set Transformation - For more complex data reshaping, filtering, and joining operations that go beyond single-string manipulation.
- Regex - For pattern-based text extraction and validation that requires regular expression matching.
- Custom Script - For multi-step or conditional text transformations that cannot be expressed with a single String Operation.
- FileToText - Produces raw extracted text that often benefits from String Operation cleanup steps downstream.