Actions3
Overview
The Symbiosika Key-Value Store node provides a simple in-memory key-value storage mechanism within an n8n workflow. It allows users to store, retrieve, and delete values associated with unique keys during the execution of workflows. This node is useful for scenarios where temporary data persistence is needed between different parts of a workflow without relying on external databases or services.
Practical examples include:
- Caching intermediate results to avoid repeated calculations.
- Storing flags or state indicators that influence subsequent workflow steps.
- Temporarily holding user input or API response data for conditional logic.
Properties
Name | Meaning |
---|---|
Key | A unique identifier for the key-value pair. |
Operation | The action to perform: "Store Value", "Get Value", or "Delete Value". |
Value | The value to store (used only when storing a value). |
Value Type | The type of the value to store; options are: Auto-Detect, Boolean, Number, Object (JSON), String. |
Value Lifetime (Minutes) | How long a stored or retrieved value remains valid after last use, in minutes. Defaults to 60. Applies to storing and retrieving operations. |
Output
The node outputs a JSON object per input item describing the result of the operation:
For Store Value:
operation
:"stored"
if the value was saved,"dropped"
if the value was empty or invalid and thus removed.key
: The key used.value
: The stored value (parsed according to the selected type).
For Get Value:
operation
: One of"retrieved"
(value found and valid),"expired"
(value expired and deleted), or"not_found"
(no value found).key
: The key used.value
: The retrieved value if found and valid.exists
: Boolean indicating whether the value exists and is valid.
For Delete Value:
operation
: Always"deleted"
.key
: The key used.existed
: Boolean indicating whether the key existed before deletion.
The output does not include binary data.
Dependencies
- No external services or APIs are required.
- The node uses an internal in-memory Map object to store key-value pairs.
- Values persist only during the lifetime of the workflow execution environment and are subject to expiration based on the configured lifetime.
Troubleshooting
- No key provided error: The node requires a non-empty key for all operations. Ensure the "Key" property is set.
- Value parsing issues: When storing values, selecting the wrong "Value Type" or providing malformed JSON for the "Object (JSON)" type can cause the value to be dropped. Verify the input matches the expected format.
- Value expiration: Values expire after the specified lifetime since last use. If a value unexpectedly appears missing, check the "Value Lifetime" setting.
- Data loss on restart: Since storage is in-memory, all data is lost if the workflow or n8n instance restarts.
Links and References
- n8n Documentation
- JavaScript Map object reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map