All nodes/Integrations/Files
File Read
Read a text file from the file store.
Type in the graph: file_read
Exec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working workflow
- Execute
- Execute + Data
Runs as pasted
When to use it
The node reads one file whose path you already know. When the path still has to be found, start with File Glob. When the file is tabular and you need rows and columns rather than text, use Read CSV or Read XLSX — they return a table, not a string. When the model is the one deciding which file to open, use File Tool.
How it works
Connection source defaults to “From the run context”: the node works on the workspace’s own
store — the same tree the Files tab browses. The file_store port is not drawn in that mode.
To read from somewhere else, switch the field to “External connection” and wire in
WS Store, WebDAV Config or
Local FS Config. Subfolder applies to the first mode only —
a wired config node owns its own root.
Text or binary is decided from the path’s extension, before anything is read. Text comes
back in content together with encoding and the truncated flag. A binary file (image,
PDF) is not decoded: it leaves on the file port as a lazy reference and content stays
empty — the bytes are fetched where they are actually needed, for example when the file goes
to a model or is attached to a reply.
A missing file, a refused permission, a store that is down: all of these fail the node with an
error code rather than returning empty content. Enable the error output to handle that case
in the graph.
Common mistakes
- Reading a binary file from the workspace store. A lazy reference only resolves for a connection-backed store, and the built-in one has no connection — the node refuses out loud instead of handing over a reference with no bytes behind it. Images and PDFs need an external disk over WebDAV.
- Extension that does not match the content. A
dump.txtholding a PDF is decoded as text. - Expecting Max bytes to go above 1 MiB. That is the ceiling: the read stops there and
raises
truncated, with no error. - A foreign encoding. Undecodable bytes are replaced with a placeholder character instead
of failing the node: a
cp1251file read asutf-8returns garbage that looks like success. - An absolute path in the field. A leading
/is simply dropped and the path is read from the store root:/etc/hostsbecomesetc/hostsinside the store, not a system file. A..segment is rejected outright.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
File storefile_store | Datadata | — | shown when connection_source ≠ "auto" |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Successoutput | Execute + Dataexecute_data | object | |
Erroron_error | Execute + Dataexecute_data | — | shown when expose_error_output = true |
Filefile | Datadata | file |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
File pathpath | string | "" | Relative to the store root. Text files come back on `content`; binary files (image/pdf/…) come back on the `file` port as a lazy reference an LLM can read. supports templates |
Connection sourceconnection_source | string | auto | Where this node gets its connection. 'From the run context' uses what the platform already knows (the Telegram bot this workflow is deployed to / this workspace's own file store) and needs no wiring. 'External connection' shows the resource port so a config node can be wired into it. Options: |
Subfolderstore_subfolder | string | "" | Optional folder inside this workspace's store to treat as the root, e.g. `reports` or `sessions/{{ variables.session_id }}`. Blank = the store root. supports templates shown when connection_source = auto |
| Advanced | |||
Max bytesmax_bytes | integer | 1048576 | Read stops here and the output flags `truncated`. |
Text encodingencoding | string | utf-8 | Used to decode text files; ignored for binary files. |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.