Paperless NGX icon

Paperless NGX

Interact with the Paperless NGX API

Overview

The node integrates with the Paperless NGX API to update an existing tag's properties. It allows modifying attributes such as the tag's name, color, matching criteria for automatic document tagging, ownership, and permissions. This is useful in document management workflows where tags help categorize and automate document processing based on content or metadata.

Practical examples:

  • Automatically assign a "Finance" tag to documents containing certain keywords.
  • Change the color of a tag to visually distinguish it in the UI.
  • Update permissions so only specific users or groups can view or modify a tag.
  • Set a tag as an "Inbox Tag" to have it automatically applied to newly imported documents.

Properties

Name Meaning
Note (globalPermissionsNote) Informational notice explaining that owner and permissions fields accept numeric IDs, and users/groups can be retrieved via separate API calls.
Tag ID (id) The unique numeric identifier of the tag to update.
Name (name) The new name for the tag.
Color (color) The hex color code representing the tag's color (e.g., #FF0000).
Match (match) A string pattern that Paperless NGX will try to match against document contents to automatically assign this tag.
Matching Algorithm (matchingAlgorithm) The algorithm used to match documents to this tag. Options include: None, Any word, All words, Literal string, Regular Expression, Fuzzy Match, Auto (automatic selection).
Case Insensitive (isInsensitive) Whether the matching should ignore case differences (true or false).
Is Inbox Tag (isInboxTag) Whether this tag should be automatically assigned to all new documents (true or false).
Owner User ID (owner) Numeric user ID to set as the owner of this tag.
Set Permissions (setPermissions) JSON object defining view and change permissions, specifying arrays of user and group IDs allowed to view or modify the tag. Example format: {"view":{"users":[],"groups":[]},"change":{"users":[],"groups":[]}}.
Note (permissionsNote) Informational notice about using Users and Groups endpoints to look up IDs for owner and permissions; no create/update/delete operations for users/groups are provided by this node.

Output

The node outputs JSON data representing the updated tag object as returned by the Paperless NGX API. This typically includes all tag properties such as its ID, name, color, matching settings, ownership, and permissions after the update operation.

No binary data output is involved.

Dependencies

  • Requires connection to a Paperless NGX instance via its REST API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The base URL for the API is derived from the configured instance URL credential.
  • To set owners or permissions, numeric user and group IDs must be obtained separately using the Users and Groups endpoints (not handled by this node).

Troubleshooting

  • Common issues:

    • Providing invalid or non-existent tag ID will cause errors.
    • Incorrect user or group IDs in permissions may lead to permission assignment failures.
    • Malformed JSON in the permissions property can cause request rejection.
    • Using unsupported matching algorithms or invalid color codes might result in validation errors.
  • Error messages and resolutions:

    • "Tag not found" — Verify the tag ID exists in the Paperless NGX system.
    • "Invalid permissions format" — Ensure the permissions JSON matches the expected structure with correct user/group ID arrays.
    • "Authentication failed" — Check that the API key/token is valid and properly configured in n8n credentials.
    • "Invalid color code" — Use a proper hex color string like #RRGGBB.

Links and References

Discussion