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 removes a specific document from a specified collection within the system. It is useful when you want to manage collections by deleting documents that are no longer relevant or needed in a particular collection without deleting the document entirely from the system.

Common scenarios:

  • Cleaning up collections by removing outdated or irrelevant documents.
  • Managing document organization by selectively removing documents from collections.
  • Automating workflows where documents need to be dynamically removed from collections based on certain triggers or conditions.

Example:
You have a collection of research papers, and one paper is retracted or outdated. Using this operation, you can remove that paper from the collection while keeping it available elsewhere if needed.

Properties

Name Meaning
Collection ID The unique identifier of the collection from which the document will be removed.
Document ID The unique identifier of the document to be removed from the collection.
Additional Options Optional settings for the request; currently supports: Timeout (in seconds) for the API call.

Output

The output of this operation is the full HTTP response returned by the API after attempting to delete the document from the collection. This typically includes status information indicating success or failure of the deletion operation.

  • The json field contains the parsed JSON response from the API.
  • If the operation is successful, the response usually confirms the removal.
  • No binary data is expected from this operation.

Dependencies

  • Requires an API key credential for authentication with the external service.
  • The node sends an authenticated DELETE HTTP request to the endpoint /collections/{collection_id}/documents/{document_id}.
  • Optionally supports a timeout query parameter to control request duration.

Troubleshooting

  • Invalid Collection ID or Document ID: Ensure that both IDs are correct and exist in the system. Errors like "404 Not Found" indicate invalid or non-existent IDs.
  • Permission Issues: If the API returns authorization errors, verify that the API key has sufficient permissions to modify the collection.
  • Timeouts: If the request times out, consider increasing the timeout value in the additional options.
  • Network Issues: Check network connectivity and API endpoint availability if requests fail unexpectedly.

Links and References

  • Refer to the API documentation of the service managing collections and documents for detailed error codes and response formats.
  • Consult n8n documentation on how to configure API credentials and handle HTTP request nodes for similar operations.

Discussion