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

The "List Collections" operation of the Collection resource in this node allows users to retrieve a list of collections associated with a user. It supports filtering, sorting, and pagination options to customize the returned collection data. This operation is useful for scenarios where you want to display or process multiple collections, such as managing document groups, organizing content libraries, or integrating collection metadata into workflows.

Practical examples include:

  • Fetching all collections owned by the current user.
  • Retrieving collections filtered by name or metadata criteria.
  • Sorting collections by update time or document count.
  • Limiting the number of collections returned for performance or UI display purposes.

Properties

Name Meaning
Additional Options A set of optional parameters to refine the list of collections returned:
- Ascending Boolean flag; if true, sorts results by the selected sort column in ascending order.
- Current User Only Boolean flag; if true, returns only collections owned by the current user.
- Limit Number; maximum number of collections to return (minimum 1, default 50).
- Metadata Filter String; filter to return only collections whose metadata matches this filter.
- Name Filter String; filter to return only collections whose names match this filter.
- Offset Number; how many collections to skip before starting to return results (default 0).
- Sort Column Option to select the attribute by which to sort collections. Possible values:
- Document Count
- Document Size
- Name
- Sessions Count
- Updated At (default)

Output

The output JSON contains an array of collection objects matching the query parameters. Each collection object typically includes metadata such as collection ID, name, description, document counts, size, session counts, timestamps, and other relevant attributes depending on the API response.

This operation does not output binary data.

Dependencies

  • Requires an API key credential for authentication to the external service.
  • The base URL for API requests is configured from the credential's URL.
  • The node sends HTTP GET requests to the /collections endpoint with query parameters based on input properties.

Troubleshooting

  • Empty Results: If no collections are returned, verify that filters like name_filter or metadata_filter are correct and that the user has collections matching those filters.
  • Authentication Errors: Ensure the API key credential is valid and has permissions to access collections.
  • Invalid Parameter Values: Check that numeric inputs like limit and offset are within acceptable ranges (e.g., limit ≥ 1).
  • Sorting Issues: If sorting does not behave as expected, confirm the sort_column value is one of the supported options.

Links and References

  • Refer to the external API documentation for detailed information about collection attributes and filtering capabilities.
  • Consult n8n documentation on configuring API credentials and using HTTP request nodes for similar integrations.

Discussion