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 listing, creating, deleting buckets, and managing objects (files or data) stored inside these buckets.

For the List Objects operation on the Object resource, the node retrieves a list of objects stored in a specified bucket. This is useful for scenarios where you want to enumerate files or data entries stored in a NATS JetStream Object Store bucket, for example:

  • Displaying all files available in a storage bucket before processing.
  • Synchronizing or backing up object metadata.
  • Auditing contents of a bucket programmatically.

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 output is an array of JSON objects representing the objects found in the specified bucket. Each item in the output corresponds to one object in the bucket and contains metadata about that object.

The exact structure of each object depends on the underlying NATS JetStream Object Store API but typically includes fields like object name, size, creation date, and other relevant metadata.

No binary data output is produced by this operation since it only lists metadata, not the actual object content.

Dependencies

  • Requires a connection to a NATS JetStream server with access to the Object Store feature.
  • Needs an API key credential configured in n8n to authenticate with the NATS server.
  • Uses the nats library bundled internally for communication with the NATS JetStream service.

Troubleshooting

  • Invalid Bucket Name: If the bucket name contains invalid characters (spaces, dots, or special characters), the node will throw a validation error. Ensure bucket names use only letters, numbers, hyphens, and underscores.
  • Unknown Operation Error: If the operation parameter is incorrect or unsupported, the node throws an "Unknown object operation" error. Verify the operation name is exactly "List Objects" or the correct internal identifier.
  • Connection Issues: Failure to connect to the NATS server due to wrong credentials or network issues will cause errors. Check your API key credential and network connectivity.
  • Empty Results: If the bucket exists but contains no objects, the output will be an empty array. Confirm the bucket actually has stored objects.

Links and References

Discussion