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 "List a Collection's Documents" allows users to retrieve a list of documents contained within a specified collection. It is useful for scenarios where you want to programmatically access or manage documents grouped under a particular collection, such as fetching documents for review, processing, or further automation workflows.

Practical examples include:

  • Retrieving all documents in a project-specific collection to analyze or export them.
  • Filtering documents by metadata to find specific subsets within a collection.
  • Paginating through large collections by using offset and limit parameters.

Properties

Name Meaning
Collection ID The unique identifier (ID) of the collection whose documents you want to list.
Additional Options Optional parameters to refine the document listing:
- Offset Number of documents to skip before starting to return results (for pagination).
- Limit Maximum number of documents to return in the response.
- Metadata Filter A JSON string representing metadata criteria to filter documents by their metadata attributes.

Output

The output contains a JSON array of document objects belonging to the specified collection. Each document object typically includes details such as document ID, name, metadata, creation date, and other relevant attributes depending on the API response.

If binary data is included (not typical for this operation), it would represent file contents or attachments related to the documents, but this operation primarily returns metadata and document listings.

Dependencies

  • Requires an API key credential for authentication with the external service.
  • The node communicates with an API endpoint constructed from the base URL plus /collections/{collection_id}/documents.
  • Proper network connectivity and valid credentials are necessary.
  • No additional environment variables are explicitly required beyond the API key and base URL configuration.

Troubleshooting

  • Invalid Collection ID: If the collection ID does not exist or is incorrect, the API will likely return an error indicating the collection was not found. Verify the collection ID input.
  • Authentication Errors: Missing or invalid API key credentials will cause authorization failures. Ensure the API key is correctly configured.
  • Pagination Issues: Using an offset larger than the total number of documents may result in empty responses. Adjust offset and limit accordingly.
  • Metadata Filter Format: The metadata filter must be a valid JSON string. Malformed JSON will cause request errors. Validate the JSON syntax before use.

Links and References

  • Refer to the official API documentation of the service managing collections and documents for detailed schema and examples.
  • For JSON filtering syntax, consult JSON query/filtering standards or the API’s metadata filtering guide.
  • n8n documentation on how to configure API key credentials and use HTTP Request nodes for similar operations.

Discussion