NATS Object Store
Store and retrieve objects (files, data) in NATS JetStream Object Store - manage buckets and objects
Actions8
- Object Actions
- Bucket Actions
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.
Common scenarios include:
- Storing files or data blobs in a scalable object store.
- Organizing data into buckets for multi-tenant or project-based separation.
- Retrieving or updating specific objects by their path or name.
- Managing bucket lifecycle and configuration programmatically.
Practical example:
- Uploading a sales report PDF to a "reports" bucket under the path
2024/sales.pdf. - Fetching an image file from a bucket to use in another workflow.
- Deleting outdated objects or cleaning up buckets automatically.
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 name or path of the object within the bucket. Can include forward slashes for folder-like organization. Examples: images/logo.png, documents/report.pdf |
Output
The node outputs JSON data representing the result of the requested operation on buckets or objects. For example:
- When retrieving an object, the output JSON contains metadata and content details of the object.
- When managing buckets, the output includes status or configuration information.
- In case of errors, the output includes error details linked to the specific item processed.
If binary data is involved (e.g., object content), it is encoded as a Uint8Array internally but exposed as part of the JSON output or handled according to n8n's binary data conventions.
Dependencies
- Requires connection to a NATS JetStream server with appropriate credentials (an API key or authentication token).
- The node depends on the NATS client libraries bundled within the node package.
- Proper configuration of the NATS connection credentials in n8n is necessary before using this node.
Troubleshooting
- Invalid bucket name: Bucket names must not contain spaces or dots and should only use letters, numbers, hyphens, and underscores. Using invalid characters will cause validation errors.
- Unknown resource or operation: If an unsupported resource or operation is specified, the node throws an error indicating the unknown type. Ensure that the resource is either "bucket" or "object" and the operation matches supported actions.
- Connection issues: Failure to connect to the NATS server due to incorrect credentials or network problems will prevent any operation. Verify credentials and network accessibility.
- Object not found: Attempting to get or delete an object that does not exist will result in an error. Confirm the object name/path is correct.
- Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, collecting errors in the output.