Skip to content

OpenKM Documents

OpenKM Documents connects your flow to the OpenKM document management system to work with documents: upload a new one to a folder, read its properties, search documents by different criteria, move them, rename them, lock them for editing, store a new version or delete them.

To create and organise folders, use OpenKM Folders.

When to use it

  • Invoices arrive by email and you want to store them in the OpenKM invoices folder.
  • You want to find the documents by one author, or that contain a word, to review them.
  • A flow produces a new version of a contract and you want to store it in OpenKM with a comment.
  • You want to move the documents of a closed case to an archive folder.
  • An AI agent needs to read a document’s properties to answer a question.

Configuration

You need an OpenKM credential with your server address, your username and your password. See Credentials.

FieldWhat it does
Credential (required)The OpenKM credential used to access the system.
Operation (required)What the component does. See Operations. Default: Get Properties.
Document UUIDThe identifier or full path of the document. Required in every operation except Upload Document and Search Documents.
Parent Folder UUIDOnly in Upload Document. The identifier of the folder where the document is stored. Required.
File URLIn Upload Document, the public address of the file to upload (required). In Checkin, the address of the new version’s file. In both cases it also accepts the file encoded in Base64 as a data: value.
Document NameOnly in Upload Document. The document’s name in OpenKM. Empty, it is taken from the file address.
Destination FolderOnly in Move Document. The identifier or path of the destination folder, for example /okm:root/archive. Required.
New NameOnly in Rename Document. The new name. The file’s original extension is always kept. Required.
Version CommentOnly in Checkin. An optional comment describing the changes in the version.
IncrementOnly in Checkin. How the version number changes: 0 no change, 1 minor version (for example, from 1.0 to 1.1), 2 major version (from 1.1 to 2.0). Default: 1.
LimitOnly in Search Documents. Maximum number of results. Default: 10.
Add Search FilterOnly in Search Documents. Adds a search criterion. Each filter you choose appears as a new field with its name, where you type the value; the bin icon removes it.

Operations

OperationWhat it does
Upload DocumentUploads a file to a folder and creates it as a document.
Get PropertiesReturns the properties OpenKM keeps for a document, such as its path.
Delete DocumentDeletes a document.
Move DocumentMoves a document to another folder.
Rename DocumentChanges a document’s name.
CheckoutLocks a document for editing.
CheckinUploads the new version of a locked document, with its comment, and unlocks it.
Cancel CheckoutRemoves the lock from a document without saving changes.
Search DocumentsSearches documents with the filters you add.

Search filters

The Add Search Filter filters use OpenKM’s names. The most common are name (document name), content (text it contains), title, author, keyword, category, folder (folder to search in), folderRecursive (true to include subfolders), mimeType (file type), lastModifiedFrom and lastModifiedTo (modification dates) and sortField with sortReverse (order of the results). In keyword, category and property you can write several values separated by commas.

Output

The Data output returns OpenKM’s answer. Search Documents returns one item per document found, with its properties. Get Properties returns the document’s properties. The other operations return OpenKM’s confirmation or a summary of what was done.

The component can also be connected to an Agent as a tool, so the agent searches or archives documents when it needs to. See Tool Mode.

Example

An accounting firm wants to store in OpenKM the invoices it receives by email.

  1. The flow starts with the email that carries the invoice as an attachment.
  2. Add OpenKM Documents with the Upload Document operation.
  3. In Parent Folder UUID enter the identifier of the invoices folder and in File URL connect the attachment’s address.
  4. In Document Name write the supplier’s name followed by the date.
  5. Connect Data to a messaging component that tells the accounting team.

Good practices

  • To change a document’s content, run Checkout first and then Checkin with the new file.
  • Add only the filters you need: each filter with a value narrows the search further.
  • To find a folder and its identifier, use List Contents in OpenKM Folders.