Read Text File
Controlled node
Overview
The Read Text File node reads a plain text file from the project library and returns its contents as text. It is useful for loading prompts, notes, exported summaries, logs, or other .txt assets back into a workflow.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the file read. | - |
| File | FileSource | The text file to read from the library. The picker is filtered to text/plain files. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the node has finished running. |
| Output | Data | The raw text contents of the selected file. If the file cannot be read, this output contains an error object. |
Runtime Behavior and Defaults
- Controlled Node: The node runs only when the Run event fires.
- Project Requirement: A runtime project ID is required so the node can read from the project library.
- File Selection: If File receives an array, the node reads the first file in the array.
- File Validation: The runtime requires a valid file reference with an
id. - Text Parsing: The runtime reads the file through the text parser and returns
rawText. - Error Handling: If the project ID, file reference, text parsing, or file read fails, Output contains an error object instead of text.
Example Usage
Load Saved Text
- Select a
.txtfile in the node panel, or connect a file reference from Find Library Files or Get Library Files to File. - Trigger Run from a Start node or another event.
- Connect Output to Show, AI Write, or a text-processing node.
The node returns the selected file contents as plain text.
tip
Use Write Text File when you need to save workflow text output before reading it back later.