Actions3
Overview
The node implements a simple in-memory key-value store with three main operations: storing a value, retrieving a value by its key, and deleting a value by its key. It is useful for scenarios where temporary data persistence is needed within an n8n workflow without relying on external databases or services.
Typical use cases include:
- Caching intermediate results during workflow execution.
- Storing configuration flags or tokens temporarily.
- Sharing small pieces of data between different parts of a workflow.
For example, you can store a session token with a specific key and retrieve it later in the workflow, 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 for all operations. |
| Value | The value to store (only for "Store Value" operation). |
| Value Type | The type of the value to store (only for "Store Value"): Auto-Detect, Boolean, Number, Object (JSON), or String. |
| Value Lifetime (Minutes) | How long the stored or retrieved value remains valid after last use, in minutes. Applies to "Store Value" and "Get Value" operations. Defaults to 60 minutes. |
Output
The output is an array of JSON objects, each representing the result of processing one input item. Each output JSON contains:
key: The key used in the operation.operation: The performed operation status, which can be:"stored": Value was successfully stored."dropped": Value was deleted because it was null or undefined."retrieved": Value was found and returned."expired": Value existed but expired due to lifetime timeout."not_found": No value found for the given key."deleted": Value was deleted (exists flag indicates if it existed before deletion).
value: The stored or retrieved value (for "storeValue" and "getValue" when applicable).exists: Boolean indicating whether the key existed (for "getValue" and "deleteValue").
If the node encounters an error and is set to continue on failure, the output will contain an error field describing the issue.
The node does not output binary data.
Dependencies
- This node uses an internal in-memory JavaScript
Mapobject to store key-value pairs. - No external services, APIs, or credentials are required.
- Data persists only during the runtime of the workflow execution; restarting n8n or the workflow clears the store.
Troubleshooting
- No key provided: The node requires a non-empty key string. If missing, it throws an error.
- Invalid value for the specified type: When storing a value, if the value cannot be parsed or converted to the selected type (e.g., invalid JSON for object type), the value will be treated as undefined and the key may be dropped.
- Expired values: Values expire after the configured lifetime since their last access. Attempting to get an expired value returns
"expired"and deletes it from the store. - Value lifetime less than or equal to zero: The node defaults the lifetime to 60 minutes if a non-positive number is provided.
- Since the store is in-memory, all data is lost if the workflow or n8n instance restarts.