Reference · Tools

Read Binary Files

Read multiple files matching a glob pattern from the local filesystem and return each as binary data.

Action (binary) Core Nodes v1 Binary data

Read Binary Files reads every file matching a glob pattern from the execution's files directory and emits one item per matched file, each carrying the file as binary data. A typical build is picking up everything an earlier extraction step wrote and processing each file in turn.

Node type
Action (binary)
Parameters
3
Outputs
Output, Error
Credentials
None required

Read Binary Files

Read multiple files matching a glob pattern from disk into binary data

Overview

The Read Binary Files tool uses a glob pattern to find all files matching it within the execution files directory. Each matched file is read from disk and attached to its own output item as binary data, producing one output item per file with the file’s metadata in JSON. This is a one-to-many node. The glob is executed once, and the output cardinality equals the number of matched files. If no files match, the node outputs an empty array (not an error). All filesystem operations are sandboxed to prevent directory traversal.

Category: Core Nodes
Tool Name: read_binary_files
Version: 1

Appearance: Icon: lucide-FileDown | Color: #7D54C9

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool does not require any credentials.

Parameters

ParameterTypeRequiredDefaultDescription
File SelectorstringYesGlob pattern for files to read, relative to the execution files directory. Supports wildcards (*, **), character classes ([abc]), and negation (!pattern). Examples: “*.jpg”, “data/**/*.csv”, “reports/2024-*.pdf”.
Binary PropertystringYesdataName of the binary property to store the file contents under on each output item. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Max ConcurrencynumberNo5Maximum number of files to read concurrently. Lower values reduce memory usage for large file sets.

Output Data

This node changes item cardinality: it emits one output item per matched file, not one per input item. The glob runs once for the whole node, using the File Selector as configured — so ten input items and a pattern matching three files still produce three output items, not thirty. Matches are returned in sorted order, so the output is deterministic.

If the pattern matches nothing, the node emits no items at all. That is not an error and nothing is routed to the Error output.

Each output item’s JSON is the file’s metadata only — the input item’s own JSON is not carried over:

{
  "mimeType": "image/jpeg",
  "fileType": "image",
  "fileName": "photo.jpg",
  "fileExtension": "jpg",
  "fileSize": "1.24 MB",
  "filePath": "uploads/2026/photo.jpg"
}
  • mimeType — detected from the file name and its contents.
  • fileType — the broad category from the MIME type (image, audio, video, text or application), or unknown.
  • fileName — the bare file name including its extension.
  • fileExtension — the extension without the leading dot.
  • fileSize — a human-readable string such as 938 B, 1.24 MB, not a number.
  • filePath — the file’s path relative to the execution files directory, using forward slashes.

The file contents are attached as binary data under the name given by Binary Property. Each output item carries only its own file’s binary; binary from the input item is not forwarded.

Reference a file downstream by expression, e.g. {{ $json.filePath }}.

Usage Examples

  • Read all PDF files from an uploads directory
  • Load all images matching *.jpg from a folder
  • Import all CSV files in a reports directory for processing
  • Read all files recursively from a nested directory structure

Example Configuration

Read every PDF whose name starts with a year:

{
  "type": "read_binary_files",
  "parameters": {
    "fileSelector": "reports/2024-*.pdf",
    "binaryPropertyName": "data",
    "maxConcurrency": 5
  }
}

Read every CSV in a directory tree:

{
  "type": "read_binary_files",
  "parameters": {
    "fileSelector": "data/**/*.csv",
    "binaryPropertyName": "csvFile",
    "maxConcurrency": 3
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Read multiple files matching a glob pattern from the execution files directory into binary data items — one output item per matched file.

Behavior notes

  • The pattern is read once, from the node, not per item. Wiring several items into this node does not read the files several times, and it does not let each item supply its own pattern. To read a different set of files per item, use Read/Write Files from Disk instead.
  • Paths are relative and sandboxed. File resolution is restricted to the execution files directory. Patterns that try to climb out of it with ../ are rejected, and absolute paths are not permitted. Symbolic links are not followed.
  • Dotfiles are skipped. Files whose name starts with a dot are not matched, even by *.
  • Lower Max Concurrency for large files. Every matched file is read into memory before being stored, so reading many large files at once is the main memory pressure this node creates.

Frequently asked questions

Can each incoming item supply its own pattern?

No. The pattern is read once from the node rather than per item, so wiring several items in does not read the files several times. Use Read/Write Files from Disk if the pattern must vary per item.

Where does it read from?

The execution's own files directory — paths are relative and sandboxed, so it can only see what a node in the same run has written.

How many items does it produce?

One per matched file, so a glob matching twelve files produces twelve items for the next node.

Does it need credentials?

No.

Build with the Read Binary Files node

Drop it into a workflow, wire it to an agent, or call it on a schedule.

Open BusyBot

Last updated . Spotted something wrong? Tell us.