Skip to main content

Move Library File

Controlled node

Overview

Moves a file within the Intellectible library from its current location to a new folder path. This node is useful for organizing files programmatically within your workflows, such as moving processed files into archive folders or categorizing uploads based on content analysis.

Path handling

If the destination path does not exist, the system will attempt to create the necessary directory structure automatically.

Inputs

InputTypeDescriptionDefault
RunEventFires when the node starts running-
FileFileSourceThe file to move. Accepts a single file selection from the library.-
PathTextThe destination folder path (e.g., "processed/invoices" or "archive/2024"). Use forward slashes to denote subdirectories.-

Outputs

OutputTypeDescription
DoneEventFires when the file has been successfully moved or if an error occurs
FileDataContains the moved file's metadata (including updated directory location), or an error object if the operation failed

Runtime Behavior and Defaults

  • Controlled Execution: This node requires a Run event to execute. It will not run automatically when data is available.
  • Array Handling: If the File input receives an array of files, only the first file in the array will be moved.
  • Validation: The node validates that both the project ID and file ID are available before attempting the move operation.
  • Error Handling: If the move operation fails (e.g., due to permissions or storage issues), the File output will contain an error object with a descriptive message rather than throwing an unhandled exception.
  • Single File Limit: The file picker is configured to accept only a single file (maxFiles: 1) of any type (show: "*").

Example Usage

Scenario: Move a processed document into an archive folder after analysis.

  1. Connect an AI analysis node (e.g., AI Vision Write) to process a document
  2. Connect the analysis output to a Move Library File node
  3. Set the Path input to "processed/{{date}}/approved" using a template with the current date
  4. When the Run event fires (triggered by the analysis completion), the file is moved to the specified archive folder
  5. Use the Done event to trigger downstream nodes that should run after the file is archived
// Example output from the File socket after successful move:
{
id: "doc_12345",
name: "invoice.pdf",
mimeType: "application/pdf",
dir: "processed/2024/approved",
size: 1024000
}