All nodes/Integrations/Files

File Read

Read a text file from the file store.

File Read
File storeSuccess
Error
File

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

Entry
File Read
Exit
  • Execute
  • Execute + Data
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

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.txt holding 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 cp1251 file read as utf-8 returns 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/hosts becomes etc/hosts inside the store, not a system file. A .. segment is rejected outright.

Inputs

PortWirePayloadNotes
File storefile_storeDatadata

shown when connection_source ≠ "auto"

Outputs

PortWirePayloadNotes
SuccessoutputExecute + Dataexecute_dataobject
Erroron_errorExecute + Dataexecute_data

shown when expose_error_output = true

FilefileDatadatafile

Configuration

FieldTypeDefaultDescription
File pathpathstring""

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_sourcestringauto

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: auto — From the run context, external — External connection (wire a config node)

Subfolderstore_subfolderstring""

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_bytesinteger1048576

Read stops here and the output flags `truncated`.

Text encodingencodingstringutf-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.