Get Library Files
Controlled node
Overview
Retrieves detailed metadata for documents selected from the project library. This node is typically used when you need to access file information (such as MIME type, size, or directory location) for files that will be processed later in the workflow, such as attaching to emails or processing with document parsing nodes.
The node takes a file selection input and enriches it with additional metadata from the library database, returning a complete file information object that can be passed to other nodes like Write To Library, Read PDF, or mail nodes for attachments.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the node to fetch metadata for the selected documents. | - |
| Documents | FileSource | One or more files selected from the project library via the file picker UI. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the metadata has been successfully retrieved. |
| Metadata | Data | An array of document objects containing enriched metadata: id, name, mimeType, dir (directory), and size. |
Runtime Behavior
When triggered, the node validates the project context and processes the input documents array. For each document selected, it queries the project database to retrieve the complete file metadata including the MIME type and file size.
If the project ID cannot be determined or the input documents array is empty, the node returns an empty array. The output is always an array of objects, even if only a single file is selected.
Example
Retrieving File Metadata for Email Attachments
Connect the Get Library Files node to a mail node to attach documents with proper metadata:
- Add a Get Library Files node to your workflow
- Use the panel UI or node UI to select files from your project library
- Connect the Metadata output to the Attachments input of a Gmail Send Email or Outlook Send Email node
- Trigger the Run input to fetch the metadata before sending
The metadata output will contain objects in this format:
[
{
"id": "doc_12345",
"name": "report.pdf",
"mimeType": "application/pdf",
"dir": "root",
"size": 1024000
}
]