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 information about buckets, as well as uploading, downloading, and deleting objects stored inside these buckets.
Common scenarios where this node is beneficial include:
- Storing files or data blobs in a scalable object store for later retrieval.
- Organizing data into buckets for multi-tenant or project-based storage.
- Automating backup or archival workflows by programmatically managing objects.
- Retrieving metadata or content of stored objects for processing or analysis.
For example, you could use this node to upload daily sales reports into a "reports" bucket, retrieve them later for generating dashboards, or delete outdated files automatically.
Properties
| Name | Meaning |
|---|---|
| Resource | Choose between managing "Bucket" or "Object". |
| Operation | The action to perform on the selected resource. |
| Bucket Name | Name of the bucket to operate on. Must contain only letters, numbers, hyphens, and underscores. |
| Object Name | Path or name of the object within the bucket (can include forward slashes for organization). |
For the Object resource, supported operations include (but are not limited to) get, put, delete, and info. The "Object Name" property is required for these operations.
Output
The node outputs an array of JSON objects corresponding to each input item processed. Each output item contains the result of the operation performed:
- For bucket operations, the output JSON includes details about the bucket status or confirmation of actions like creation or deletion.
- For object operations, the output JSON contains metadata or content related to the object. For example, a
getoperation returns the object's data encoded as text (if applicable) or metadata about the object. - If an error occurs during processing an item, the output for that item will include an error object describing the failure.
The node does not explicitly output binary data fields; instead, object data is handled as encoded text within the JSON output.
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.
- Uses bundled NATS client libraries internally to interact with the JetStream Object Store.
Troubleshooting
- Invalid bucket name: Bucket names must only contain letters, numbers, hyphens, and underscores. Using spaces or dots will cause validation errors.
- Unknown resource or operation: Selecting a resource or operation not supported by the node will throw an error. Ensure the correct combination is chosen.
- Connection issues: Failure to connect to the NATS server may occur if credentials are incorrect or the server is unreachable.
- Data encoding errors: When providing object data, ensure it is properly formatted as text since the node encodes it before sending.
- To handle errors gracefully, enable the "Continue On Fail" option so the node processes all items even if some fail.