Symbiosika Key-Value Store icon

Symbiosika Key-Value Store

Store and manage key-value pairs

Overview

This node implements a simple in-memory key-value store within an n8n workflow. It allows users to store, retrieve, and delete values associated with unique keys during the workflow execution. The stored values have a configurable lifetime, after which they expire and are automatically removed if not accessed.

Common scenarios where this node is useful include:

  • Temporarily caching data between workflow executions or steps without external storage.
  • Managing state or flags that influence conditional logic in workflows.
  • Storing small pieces of information like tokens, counters, or configuration values dynamically.

For example, you could store a user session token with a 30-minute lifetime, retrieve it later in the workflow for API calls, or delete it when no longer needed.

Properties

Name Meaning
Operation The action to perform: Store Value, Get Value, or Delete Value
Key A unique identifier string for the key-value pair (required)
Value The value to store (only for Store Value operation)
Value Type The type of the value to store; options: Auto-Detect, Boolean, Number, Object (JSON), String
Value Lifetime (Minutes) How long the value remains valid after last use, in minutes (applies to Store and Get operations)

Output

The node outputs JSON objects representing the result of the operation for each input item:

  • For Store Value:

    • operation: "stored" if the value was saved, "dropped" if the value was empty or invalid and thus deleted.
    • 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 requested.
    • value: The retrieved value if found and valid.
    • exists: Boolean indicating if the value exists and is valid.
  • For Delete Value:

    • operation: Always "deleted".
    • key: The key deleted.
    • existed: Boolean indicating if the key existed before deletion.

The node does not output binary data.

Dependencies

  • This node uses an internal in-memory JavaScript Map object to store key-value pairs.
  • No external services, APIs, or credentials are required.
  • Values persist only during the runtime of the current workflow execution environment and are lost when the workflow stops or restarts.

Troubleshooting

  • No key provided error: The node requires a non-empty key string. Ensure the "Key" property is set for every input item.
  • Value parsing issues: When storing values as JSON objects or numbers, invalid JSON or non-numeric strings will cause the value to be dropped silently. Verify the input format matches the selected "Value Type".
  • Value expiration: Values expire after the configured lifetime since last access. If a value seems missing, check the "Value Lifetime" setting.
  • Data persistence: Since storage is in-memory, all data is lost if the workflow or n8n instance restarts. Use external persistent storage nodes if long-term storage is needed.

Links and References

Discussion