Skip to main content

List Library Files

Controlled node

Overview

The List Library Files node retrieves a list of all files within a specified folder in the project's library. This is useful for workflows that need to process, iterate over, or reference files stored in the library. If no path is specified, the node returns files from the root directory of the library.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the node to fetch the file list.-
PathTextThe folder path in the library to list files from. Leave empty or omit to list the root directory."" (root)

Outputs

OutputTypeDescription
DoneEventFires when the file list has been successfully retrieved.
FilesDataAn array of file objects. Each object contains: id (string), name (string), mimeType (string), size (number), and dir (string). Returns an error object if the directory is not found or the operation fails.

Runtime Behavior and Defaults

  • Controlled Execution: This node requires a Run event to execute. It will not run automatically when the workflow starts.
  • Root Directory: If the Path input is empty, omitted, or contains only whitespace, the node lists files from the root directory of the library (dir: "root").
  • Path Resolution: The node attempts to resolve the provided path to a directory ID. If the path does not exist in the library, the Files output will contain an error object with the message "Directory not found".
  • Project Context: The node automatically uses the current project's ID from the runtime context. If no project ID is available (e.g., in an unsaved workflow), it returns an error.
  • Output Format: Each file object in the returned array uses mimeType instead of type for consistency with other file handling nodes in the platform.

Example

Scenario: List all files in a "Documents" folder and process them.

  1. Connect a Start node's Fired event to the List Library Files node's Run input.
  2. Set the Path input to Documents (or leave blank to list root files).
  3. Connect the List Library Files node's Done event to a For Each node's Run input.
  4. Connect the Files output to the For Each node's Object input to iterate over each file.
  5. Inside the For Each loop, use a Get Value node to extract the id or name of each file for further processing (e.g., reading content with Read Document).
[Start] --(Fired)--> [List Library Files] --(Done)--> [For Each]
|
(Files)
|
[Process Files Loop]