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 interacts with NATS JetStream Object Store, specifically managing buckets and objects within those buckets. The "Delete Bucket" operation allows users to delete an existing bucket from the object store. This is useful for cleaning up unused storage containers or managing lifecycle of stored data.

Typical use cases include:

  • Removing obsolete or temporary buckets to free up resources.
  • Automating cleanup tasks in workflows that manage file storage.
  • Managing storage environments dynamically based on application needs.

For example, a workflow could create buckets for different projects and then delete them once the project is completed, ensuring efficient resource usage.

Properties

Name Meaning
Bucket Name Name of the Object Store bucket to delete. Bucket names can only contain alphanumeric characters, dashes, and underscores.

Output

The output JSON contains the result of the delete operation. Typically, this will be an object indicating success or details about the deletion. If an error occurs, the output will contain error information instead.

No binary data is output by this operation.

Dependencies

  • Requires a connection to a NATS JetStream server with access to the Object Store feature.
  • Needs an API authentication credential configured in n8n to connect securely to the NATS server.
  • Uses internal utilities for connection management, logging, and bucket name validation.

Troubleshooting

  • Invalid Bucket Name: If the bucket name contains invalid characters (anything other than alphanumeric, dashes, or underscores), the node will throw a validation error. Ensure the bucket name follows the naming rules.
  • Unknown Operation Error: If the operation specified is not recognized (e.g., a typo in "Delete"), the node will report an unknown operation error.
  • Connection Issues: Failure to connect to the NATS server due to incorrect credentials or network issues will cause errors. Verify the API key and network accessibility.
  • Bucket Not Found: Attempting to delete a non-existent bucket may result in an error from the NATS server. Confirm the bucket exists before deletion.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output.

Links and References

Discussion