NATS Object Store icon

NATS Object Store

Store and retrieve objects (files, data) in NATS JetStream Object Store - manage buckets and objects

Overview

This node integrates with NATS JetStream Object Store, allowing users to manage buckets and objects within those buckets. It supports operations such as creating, deleting, and retrieving bucket information, as well as managing objects (files or data) stored inside these buckets.

A common use case is storing and retrieving files or arbitrary data in a distributed messaging system backed by NATS JetStream. For example, you might use this node to list all objects in a specific bucket, upload new data objects, or delete outdated files programmatically within an n8n workflow.

Specifically, the List Objects operation under the Object resource enables users to retrieve a list of all objects stored in a specified bucket.

Properties

Name Meaning
Bucket Name The name of the bucket from which to list objects. Must contain only letters, numbers, hyphens, and underscores; no spaces or dots allowed. Example: my-files

Output

The node outputs an array of JSON objects representing the results of the requested operation. For the List Objects operation, the output JSON contains details about each object stored in the specified bucket, such as object names and metadata.

If errors occur during execution, the output includes error objects describing the issue for each failed item.

The node does not output binary data directly for the List Objects operation; it focuses on metadata and object listings.

Dependencies

  • Requires a connection to a NATS JetStream server.
  • Needs valid credentials providing access to the NATS API (an API key or authentication token).
  • Uses internal utilities for managing NATS connections and logging.
  • No additional external services are required beyond the configured NATS JetStream environment.

Troubleshooting

  • Invalid Bucket Name: If the bucket name contains invalid characters (spaces, dots, or special symbols), the node will throw a validation error. Ensure bucket names use only letters, numbers, hyphens, and underscores.
  • Unknown Operation or Resource: If an unsupported operation or resource is specified, the node throws an error indicating the unknown operation/resource. Verify that "object" is selected as the resource and "list" (or equivalent) as the operation.
  • Connection Issues: Failure to connect to the NATS server due to incorrect credentials or network issues will cause errors. Confirm that the credentials are correct and the NATS server is reachable.
  • Continue On Fail: If enabled, the node continues processing other items even if some fail, returning error details per item. Otherwise, it stops execution on the first error.

Links and References

Discussion