The Text Reader Node reads a text file line by line, yielding each line to the steps inside the iterator block without loading the entire file into memory at once.
Overview
The Text Reader Node is an iterator node that walks a text file one line at a time, delivering each line to the loop body as it goes. Use it to process log files, delimited text, or any line-oriented content where you want to handle one line at a time rather than pulling the whole file into a variable. Because it iterates rather than reads-all, it stays efficient even on large files — memory use stays flat regardless of how many lines the file contains.
Pair the Text Reader with the loop body to apply transforms, filters, or writes to each line as it arrives. Use the Is First and Is Last flags exposed by the loop to run setup or teardown logic — opening a target file, flushing a buffer — without adding conditional branches to every pass.
Reading Text Files
The node iterates a text file from a specified starting line, exposing one line at a time to the steps inside the loop body. Each pass delivers the current line of text together with metadata about its position in the file.
Inputs
Field | Description |
|---|---|
File | The text file to iterate. Read as UTF-8 by default. |
Starting Line | The line number to begin reading from. Counted from 1 — line 1 is the first line in the file. Set this to skip header rows or resume from a checkpoint. |
Loop Outputs
The following values are available inside the loop body on each pass:
Output | Description |
|---|---|
Line | The current line of text from the file. |
Index | The zero-based position of the current line within the iteration. The first line yielded has index 0, regardless of the Starting Line setting. |
Is First | True on the first iteration pass. Use this to run setup logic once — for example, opening a target file or initialising a counter. |
Is Last | True on the final iteration pass. Use this to flush a buffer or finalise output after the last line has been processed. |
Notes
Keep the following in mind when using the Text Reader Node.
Files are read as UTF-8 by default.
Starting Line is counted from 1. Line 1 is the first line in the file. Use it to skip a known number of header or already-processed lines.
Index is zero-based and counts from the first line yielded by the node, not from the beginning of the file. If Starting Line is set to 5, the first yielded line has index 0.
Use the Is First and Is Last flags to run setup or teardown logic exactly once without conditional branches on every loop pass.
The node iterates rather than reads-all — memory use stays flat regardless of file size. Prefer this node over reading an entire file into a variable for any file large enough to matter.
For structured line-delimited data (one JSON object per line), consider the JSON Node instead — it parses each line as a record and exposes typed fields rather than raw text.