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 information about buckets, as well as uploading, downloading, deleting, and getting metadata of objects stored inside these buckets.

A common use case is managing files or data blobs in a distributed messaging system environment where NATS JetStream is used for persistence. For example, you might store reports, images, or configuration files in object buckets and retrieve or update them programmatically within an n8n workflow.

Specifically, the "Get Info" operation on the "Object" resource retrieves metadata or details about a specific object stored in a given bucket.

Properties

Name Meaning
Bucket Name The name of the bucket where the object resides. Must contain only letters, numbers, hyphens, and underscores; no spaces or dots allowed. Example: my-files
Object Name The path or name of the object within the bucket. Can include forward slashes for organization (like folders). Example: reports/2024/sales.pdf

Output

The output JSON contains the result of the requested operation. For the "Get Info" operation on an object, this typically includes metadata about the object such as its size, creation date, modification date, and other relevant attributes provided by the NATS JetStream Object Store.

If the node handles binary data (e.g., when retrieving object content), it would be included in the binary output field, but for the "Get Info" operation, the output is purely JSON metadata.

Dependencies

  • Requires a valid connection to a NATS JetStream server.
  • Needs an API key credential configured in n8n for authenticating with the NATS server.
  • Uses bundled NATS client libraries internally to interact with the JetStream Object Store.
  • No additional external services are required beyond the NATS JetStream infrastructure.

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 or Resource: If an unsupported operation or resource is specified, the node throws an error indicating the unknown operation/resource. Verify that the selected operation and resource are supported.
  • Connection Issues: Failure to connect to the NATS server due to incorrect credentials or network issues will cause errors. Check the API key credential and network connectivity.
  • Object Not Found: If the specified object does not exist in the bucket, the node may return an error or empty result. Confirm the object path is correct.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details per item.

Links and References

Discussion