Actions8
- Bucket Actions
- Object 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 bucket information, as well as uploading, downloading, and managing objects (files or data) stored inside these buckets.
A common use case is storing files or structured data in a scalable, distributed object store backed by NATS JetStream. For example, you might use this node to upload reports, images, or logs into specific buckets for later retrieval or processing. It is beneficial when you want to leverage NATS JetStream's object storage capabilities directly from your n8n workflows.
Specifically, the "Put Object" operation uploads content to a specified bucket under a given object name (which can include folder-like paths).
Properties
| Name | Meaning |
|---|---|
| Bucket Name | The name of the bucket where the object will be stored. Must contain only letters, numbers, hyphens, and underscores; no spaces or dots allowed. Example: my-files |
| Object Name | The key or path identifying the object within the bucket. Can include forward slashes for organization, e.g., reports/2024/sales.pdf. Required for put, get, delete, and info operations. |
| Data | The content to store in the object. Provided as a string which will be encoded and saved as the object's data. Required for the "Put Object" operation. |
Output
The node outputs an array of JSON objects corresponding to each input item processed. For the "Put Object" operation, the output JSON typically contains metadata or confirmation details about the stored object returned from the NATS JetStream API.
If binary data were involved, it would be handled accordingly, but in this implementation, the "Data" property is provided as a string and encoded internally before storage.
Dependencies
- Requires a connection to a NATS JetStream server.
- Needs an API authentication credential configured in n8n to connect securely to the NATS server.
- Uses bundled NATS client libraries to interact with the JetStream Object Store.
- No additional external services are required beyond the NATS JetStream infrastructure.
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 Operation or Resource: If an unsupported resource or operation is selected, the node throws an error indicating the unknown type. Ensure you select valid combinations.
- Connection Issues: Failure to connect to the NATS server due to incorrect credentials or network issues will cause errors. Verify your API key and network accessibility.
- Empty Data on Put: Providing empty data for the "Put Object" operation may result in unexpected behavior or errors. Always supply valid content.
- Continue On Fail Behavior: If enabled, the node will continue processing subsequent items even if one fails, returning error details per item. Otherwise, it stops execution on the first error.