Split Text Nodes
Split Text Nodes divide a text string into a list of individual items based on a separator pattern. They are essential for batch processing — take a long text, split it into items, then use a List Selector to pick which items to process.
What is a Split Text Node?
When you have text containing multiple items (headlines separated by newlines, comma-separated values, or sentences), the Split Text Node breaks it into a list. This list can then be filtered, selected, and fed into generation nodes for batch video/image creation.
Inputs & Outputs
| Port | Direction | Type | Description |
|---|---|---|---|
| input | In | Text | Text to split — from Fetch, JSON Parser, Text, Concatenator |
| output | Out | List | List of items → List Selector, If/Else, AI If/Else, Canvas |
Inspector Controls
Input Source
The connected node providing text to split.
Split Pattern
The separator used to divide the text:
| Pattern | Name | Example Input | Result |
|---|---|---|---|
\n | Newline (default) | “Apple\nBanana\nCherry” | [“Apple”, “Banana”, “Cherry”] |
, | Comma | “red, blue, green” | [“red”, ” blue”, ” green”] |
. | Sentence | “First sentence. Second one. Third.” | [“First sentence”, “Second one”, “Third.”] |
| Custom | Any text | Depends on input | Splits on that exact text |
How to Use
- Connect a text source (Fetch → JSON Parser output, or a Text Node) to the Split Text input
- Choose the split pattern that matches your data format
- Connect the output to a List Selector Node
- The List Selector picks which items to pass downstream
Workflow Example
Batch Video from API Data: Fetch (news API) → JSON Parser (extract headlines array as text) → Split Text (by newline) → List Selector (first 3) → Text Node x 3 (one per headline) → Scene x 3 → three news videos from live data.
Tips & Best Practices
- Newline (
\n) is the most common separator — APIs often return line-separated data - Watch out for extra whitespace — splitting by comma gives
" blue"(with leading space) not"blue". The downstream node usually handles this fine - Empty items: If your text has consecutive separators (e.g., two newlines), you’ll get empty items in the list. This is usually harmless
- Chain: Fetch → JSON Parser → Split Text → List Selector is the standard data pipeline pattern
- For large datasets, use List Selector’s “First N” or “Random N” modes to limit processing
Troubleshooting
Unexpected number of items
Wrong separator. Check if your text uses newlines, commas, or another delimiter. Preview the raw text in a Text Node first.
Empty list
The input text is empty or the separator doesn’t match. Verify the upstream node is producing output.
Single item in list
The separator wasn’t found in the text. The entire text becomes one item. Check your split pattern.
See Also
- List Selector Nodes — Pick items from the split list
- Fetch Nodes — Get data to split
- JSON Parser Nodes — Extract arrays before splitting
- Prompt Concatenator Nodes — Combine items back together