Skip to main content
Split Text divides incoming text into segments on a delimiter, with options to trim whitespace and drop empty segments. The result is an array you can pass to nodes that iterate or select.

When to use

  • Break a list into individual lines
  • Tokenize a simple list into separate items
Common pattern: text_prompt → split_text → list_selector.

Inputs

Text
text
required
The text to split. Required.

Outputs

Segments
text
The resulting segments as an array.

Configuration

delimiter
string
default:"\\n"
The character or characters to split on. Use \n for newlines.
trimWhitespace
boolean
default:"true"
Remove leading and trailing whitespace from each segment.
removeEmpty
boolean
default:"true"
Drop segments that are empty after splitting.