Overview
This node interacts with the NATS JetStream Key-Value (KV) Store, allowing users to manage KV buckets and keys within those buckets. It supports operations such as creating, deleting, and retrieving bucket status, as well as managing individual keys by getting, putting, deleting, or viewing their history.
A common use case is when you want to store configuration data, user preferences, or cache information in a distributed, reliable key-value store backed by NATS JetStream. For example, you might use this node to delete a specific key from a KV bucket that holds session data or application settings.
Specifically for the Key - Delete operation, the node deletes a specified key from a given KV bucket, which is useful for cleaning up outdated or unnecessary entries.
Properties
| Name | Meaning |
|---|---|
| Bucket Name | The name of the KV bucket to operate on. Must contain only letters, numbers, underscores, and hyphens (no spaces or dots). Example: user-preferences |
| Key | The key to delete within the specified bucket. Can use dot notation for hierarchical organization (e.g., user.123.settings). Cannot contain spaces. Example: config.database.host |
Output
The output JSON contains the result of the delete operation. Typically, it will confirm the deletion or provide relevant metadata about the deleted key. If an error occurs, the output will include error details.
No binary data output is expected from the delete operation.
Example output JSON structure (conceptual):
{
"success": true,
"bucket": "my-bucket",
"key": "user.123.settings"
}
Or, in case of failure:
{
"error": "Key not found",
"bucket": "my-bucket",
"key": "user.123.settings"
}
Dependencies
- Requires a connection to a NATS JetStream server.
- Needs an API authentication token or API key credential configured in n8n to authenticate with the NATS server.
- Uses bundled NATS client libraries internally to perform KV operations.
Troubleshooting
- Invalid Bucket Name: Bucket names must only contain letters, numbers, underscores, and hyphens. Spaces or dots are not allowed. Ensure your bucket name follows these rules.
- Key Not Found: Attempting to delete a key that does not exist may result in an error. Verify the key exists before deletion.
- Connection Issues: Errors connecting to the NATS server can occur if credentials are incorrect or the server is unreachable. Check network connectivity and credential validity.
- Unknown Operation or Resource: If the node is misconfigured with an unsupported resource or operation, it will throw an error indicating the unknown type.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails; otherwise, it will stop execution on the first error.