h2oGPTe icon

h2oGPTe

h2oGPTe is an AI-powered search assistant for your internal teams to answer questions gleaned from large volumes of documents, websites and workplace content.

Actions198

Overview

This node operation associates a user with a specific document by granting them permission to access or interact with that document. It is useful in scenarios where you need to manage document-level permissions, such as sharing documents with particular users within an organization or controlling access rights on a per-document basis.

For example, if you have a document repository and want to allow a certain user to view or edit a document, this operation will link the user to the document with the appropriate permission.

Properties

Name Meaning
Document ID The unique identifier of the document to which the user will be associated.
User ID The unique identifier of the user who will be granted permission on the document.

Output

The output JSON contains the full response from the API after associating the user with the document. This typically includes confirmation of the association and any relevant metadata about the permission assignment.

The node does not output binary data for this operation.

Dependencies

  • Requires an API key credential for authentication to the external service.
  • The node sends a PUT request to an endpoint structured as /documents/{document_id}/users/{user_id} to perform the association.
  • Proper permissions and roles must be configured in the external system to allow assigning document permissions.

Troubleshooting

  • Common Issues:

    • Invalid or missing Document ID or User ID parameters will cause the request to fail.
    • Insufficient permissions of the API key or user performing the operation may result in authorization errors.
    • If the document or user does not exist, the API will return an error indicating the resource was not found.
  • Error Messages:

    • 404 Not Found: The specified document or user ID does not exist. Verify the IDs are correct.
    • 401 Unauthorized or 403 Forbidden: The API key or user lacks permission to assign document permissions. Check credentials and roles.
    • 400 Bad Request: Missing required parameters or invalid input format. Ensure both Document ID and User ID are provided and valid.

Links and References

  • Refer to your external service's API documentation for details on managing document permissions and user associations.
  • Consult n8n documentation on how to configure API key credentials and handle HTTP requests.

Discussion