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
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the node to fetch the file list. | - |
| Path | Text | The folder path in the library to list files from. Leave empty or omit to list the root directory. | "" (root) |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the file list has been successfully retrieved. |
| Files | Data | An 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
Runevent to execute. It will not run automatically when the workflow starts. - Root Directory: If the
Pathinput 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
Filesoutput 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
mimeTypeinstead oftypefor consistency with other file handling nodes in the platform.
Example
Scenario: List all files in a "Documents" folder and process them.
- Connect a Start node's
Firedevent to the List Library Files node'sRuninput. - Set the Path input to
Documents(or leave blank to list root files). - Connect the List Library Files node's
Doneevent to a For Each node'sRuninput. - Connect the Files output to the For Each node's
Objectinput to iterate over each file. - Inside the For Each loop, use a Get Value node to extract the
idornameof each file for further processing (e.g., reading content with Read Document).
[Start] --(Fired)--> [List Library Files] --(Done)--> [For Each]
|
(Files)
|
[Process Files Loop]