Skip to content

OpenKM Folders

This component allows you to manage the folder structure within your OpenKM Document Management System. It helps you organize documents by creating new folders, changing their names, moving them to different locations, or viewing the contents of existing directories. Think of it as a digital filing cabinet assistant that ensures your documents are stored in the correct places.

How it Works

This component connects directly to the OpenKM server using a secure credential. When you configure it, you are essentially telling the system where you want to make changes (the folder path) and what kind of change you want to make (create, rename, move, etc.).

Internally, the component sends instructions to the OpenKM database. For example, if you ask it to “Create a Folder,” it checks if the parent folder exists, verifies you have permission, and then adds the new folder to the system. It then returns a confirmation (success or error) and details about the folder you just modified so you can use that information in subsequent steps of your automation.

Connection & Credentials

This component requires configuring a credential in the Nappai panel before interacting with the external service:

  1. Go to the Credentials section in your Nappai panel.
  2. Create a new credential of the type OpenKM and fill in the required fields:
    • Base URL: The address of your OpenKM server (e.g., http://localhost:8080/OpenKM).
    • Username: Your login username (e.g., okmAdmin).
    • Password: Your login password.
  3. In your workflow, select the saved credential in the Credential input field of this node.

Operations

This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:

  • Create: Creates a new folder inside a specified parent folder.
  • Rename: Changes the name of an existing folder without moving it.
  • Move: Relocates a folder from one directory to another.
  • Delete: Removes a folder from the system (optionally including its contents).
  • Get: Retrieves information about a specific folder, such as its ID or creation date.
  • List: Shows all the folders and files contained inside a specific folder.

To use the component, first select the operation you need in the “Operation” field.

Inputs

Input Fields

The following fields are available to configure this component. Each field may be visible in different operations:

  • Credential: The OpenKM credential configured in your Nappai panel that provides access to your document system.
  • Operation: The specific action you want to perform on the folder.
  • Folder ID / UUID: The unique identifier of the folder you are targeting for the operation.
  • Parent Folder UUID: The unique identifier of the parent folder where a new folder will be created.
  • Folder Name: The name you want to give to a new folder or the new name for an existing folder.
  • Folder Path: The full path of a folder or hierarchy you want to interact with (e.g., /okm:root/projects).
  • Destination Folder UUID: The unique identifier of the folder where you want to move a source folder.
  • New Name: The new name for the folder when using the Rename operation.

Outputs

Output Data Example (JSON)json

{ “success”: true, “folder_info”: { “id”: “a1b2c3d4-e5f6-7890-abcd-ef1234567890”, “name”: “Marketing Documents”, “path”: “/okm:root/Marketing/Marketing Documents”, “created”: “2023-10-27T10:30:00Z”, “permissions”: [“read”, “write”, “delete”] }, “error_message”: null }

When you run this component, it returns data that you can use in later steps. The most common output is a “Success” flag (true or false) and specific folder details like the folder’s ID or path. If an operation fails, it will provide an “Error Message” explaining why, so you can fix the issue.

Connectivity

This component is typically used at the beginning of a workflow to set up the structure for document storage.

  • Connects To: It often connects to other components that handle document uploads or searches. For example, after creating a folder (Output: folder_info), you might connect it to a “Upload Document” component, using the new folder’s ID as the destination.
  • Logical Flow: It acts as the “organizer” node. Other components (like Data Processors or AI Analyzers) often provide the names or paths that this component uses to organize those data points.

Usage Example

Scenario: You are automating the onboarding process for new clients.

  1. Create Client Folder: Use the Create operation.
    • Parent Folder UUID: Select the “Clients” folder.
    • Folder Name: Input the client’s name (e.g., “Acme Corp”).
    • Result: The component creates the folder and returns the new Folder ID.
  2. Move Documents: Use the Move operation (or another component).
    • Destination Folder UUID: Use the output from Step 1 (the new client folder ID).
    • Result: Temporary files are moved into the permanent, structured client folder.

This ensures that every new client gets their own organized digital space automatically.

Tips and Best Practices

  • Use IDs for Accuracy: When moving or renaming folders, using the Folder ID / UUID is safer than using paths, as IDs are unique and won’t conflict if folder names are duplicated.
  • Check Success: Always check the success output. If it is false, check the error_message to understand if the folder already exists or if permissions are missing.
  • Recursive Deletion: If you are deleting a folder that contains other items, ensure you are aware of the behavior regarding its contents to avoid accidental data loss.

Security Considerations

  • Credential Security: Ensure your OpenKM credentials are stored securely in the Nappai Credentials section. Do not hardcode passwords in the workflow fields.
  • Permissions: The component will only perform actions that the user associated with the credential is allowed to do. If a folder cannot be deleted or moved, it is likely due to permission restrictions set by your OpenKM administrator.