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. Specifically for the Delete Object operation under the Object resource, it deletes a specified object (file or data) from a given bucket in the NATS Object Store.

Common scenarios include:

  • Removing outdated or unwanted files from cloud storage.
  • Cleaning up temporary data after processing.
  • Managing storage space by deleting obsolete objects.

Practical example:

  • Deleting a report file named reports/2024/sales.pdf from the bucket my-files after the report has been archived elsewhere.

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 to delete within the bucket. Can include forward slashes for organization. Example: reports/2024/sales.pdf.

Output

The node outputs JSON data representing the result of the delete operation. Typically, this will confirm successful deletion or provide details if an error occurred.

  • The output JSON structure depends on the underlying NATS JetStream response but generally includes status information about the deleted object.
  • No binary data is output by this operation.

Dependencies

  • Requires a valid 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.
  • The node uses bundled NATS client libraries internally to perform operations.

Troubleshooting

  • Invalid bucket name error: Bucket names must not contain spaces or dots and should only use letters, numbers, hyphens, and underscores. Ensure the bucket name follows these rules.
  • Object not found: If the specified object name does not exist in the bucket, the node may throw an error indicating the object could not be found.
  • Connection issues: Errors related to connecting to the NATS server usually indicate incorrect credentials or network problems. Verify API keys and network accessibility.
  • Unknown operation or resource: If the operation or resource parameter is misspelled or unsupported, the node throws an error. Double-check the property values.
  • To continue processing other items even if one fails, enable the "Continue On Fail" option in the node settings.

Links and References

Discussion