Paperless NGX icon

Paperless NGX

Interact with the Paperless NGX API

Overview

The node integrates with the Paperless NGX API to create a new Document Type. This operation allows users to define a category or classification for documents within the Paperless NGX system, which can then be used to automatically organize and manage documents based on their content.

Typical use cases include:

  • Automating document categorization by defining matching rules that assign incoming documents to specific types.
  • Setting ownership and permissions for document types to control access and editing rights.
  • Using different matching algorithms to fine-tune how documents are recognized and classified.

For example, a user might create a "Invoice" document type that matches any document containing the word "Invoice" (using the "Any" matching algorithm), assigns ownership to a specific user, and sets view/change permissions for certain groups.

Properties

Name Meaning
Note (globalPermissionsNote) Informational notice explaining that owner and permissions fields accept numeric IDs, and suggesting to retrieve available Users and Groups via separate API calls.
Name (name) The name of the document type to create. This is a required string field.
Match (match) A string pattern that Paperless NGX will try to match against document contents to automatically assign this document type.
Matching Algorithm (matchingAlgorithm) The algorithm used to match documents to this document type. Options include: None, Any (match any word), All (match all words), Literal (exact string), Regular Expression, Fuzzy Match, Auto (automatic choice).
Case Insensitive (isInsensitive) Boolean flag indicating whether the matching should ignore case differences.
Owner User ID (owner) Numeric user ID to set as the owner of this document type.
Set Permissions (setPermissions) JSON object specifying view and change permissions, each containing arrays of user and group IDs. Format: {"view":{"users":[],"groups":[]},"change":{"users":[],"groups":[]}}
Note (permissionsNote) Informational notice advising to use Users and Groups endpoints to look up IDs for owner and permissions, noting that this node does not provide user/group management operations.

Output

The node outputs JSON data representing the newly created Document Type as returned by the Paperless NGX API. This typically includes fields such as the document type's unique identifier, name, matching criteria, owner information, and permissions settings.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to a Paperless NGX instance via its REST API.
  • Needs an API authentication token or key configured in the node credentials to authorize requests.
  • The base URL for the API is derived from the provided instance URL credential.
  • To correctly set owner and permissions, users must retrieve valid numeric user and group IDs using separate API calls (e.g., via Users and Groups endpoints).

Troubleshooting

  • Invalid or missing API credentials: Ensure the API key/token and instance URL are correctly configured in the node credentials.
  • Incorrect user or group IDs: Owner and permission fields require numeric IDs; using invalid or non-existent IDs will cause errors. Retrieve these IDs beforehand using the appropriate API endpoints.
  • Matching algorithm misconfiguration: Selecting an inappropriate matching algorithm or providing an invalid match string (e.g., malformed regex) may result in failed document classification.
  • Permission denied errors: Verify that the API user has sufficient rights to create document types and assign ownership/permissions.
  • API connectivity issues: Confirm network access to the Paperless NGX instance and that the base URL is correct without trailing slashes.

Links and References

Discussion