View Categories

Text Splitter

In this article, we’ll show you how to use the “Text Splitter” node in AI Content Labs, from its configuration to usage tips so you can make the most of this functionality.

What is the Text Splitter Node and What is it Used For?

The Text Splitter takes a block of text and separates it into several parts. This is very useful when you need to process each segment independently in the flow, for example:

  • Splitting an outline into different sections and then sending each part to a Prompt node to generate specific content.
  • Separating paragraphs to analyze, translate, or format individually through other nodes like the Text Transformer or the Prompt.
  • Preparing data for different purposes, reducing the manual work of cutting or copying text segments.

Important: Each split generates additional executions in the nodes that depend on it. Also, only up to 3 chained splits are allowed consecutively. During testing, we recommend limiting them to two to avoid unnecessary resource consumption.

View of the Text Splitter node in the flow diagram

Configurations

Changing the Node Name

By default, the node is called “Text Splitter”. You can edit its name by clicking on the pencil icon:

Text Splitter node configuration options

Output Settings

By clicking on Output Settings, you will see the following options:

Text Splitter output options on the platform

  • Hide Node Output
    Hides the result of this node when presenting the final results of the flow. Thus, the content will only be used internally.
  • Do Not Send to Webhook
    Prevents the result of this node from being sent to a webhook, if you are using that integration in your flow.
  • Send Output in HTML
    Sends, in addition to the plain text, an HTML version of this content.
  • Add Prefix / Add Suffix
    Adds text or a tag at the beginning (prefix) or end (suffix) of each of the generated divisions.
  • Split Pattern
    Indicates the pattern that determines how the text will be divided. By default, the newline character (\n) is used, but you can change it according to your needs (for example, a hyphen or semicolon).

Note on “Multiple” Output

If at any time you want to merge the separated text fragments, you can use the Text Merger node, as long as the divisions come directly from a “Text Splitter” or one of its descendant nodes.

Usage Tips

  • Test in small parts
    During the testing phase, consider using fewer divisions to avoid triggering costs or complexity in dependent nodes.
  • Split first, use nodes later
    Use it before a Prompt node if you want each segment to have specific treatment (for example, translating each fragment).
  • Combine with the Text Merger
    If you later need to rejoin the parts, connect the Text Merger to the results of the Text Splitter.
  • Respect the 3-split limit
    Avoid more than three levels of chained divisions to keep the flow operational and agile.

Finally, the Text Splitter is a powerful tool when you need to work with independent text segments in your flows. It will help you save time and automate tasks that could otherwise be very repetitive or prone to error. If you also combine it with other nodes like Prompt, Fixed Text or Text Transformer, you will achieve highly efficient and organized flows.