Lola Store v2
AI-generatedOverview
The Lola Store v2 node allows you to store, retrieve, and clear key-value data associated with a specific chat or session. This is useful for workflows that require persistent storage of user-specific or session-specific information, such as maintaining conversation context, storing temporary variables, or managing chat history in chatbot applications.
Practical examples:
- Retrieve a user's last known preferences during a chat session.
- Store the result of an API call for later use within the same workflow.
- Clear chat history while optionally retaining only the most recent messages.
Properties
| Name | Meaning |
|---|---|
| Operation | The action to perform: - Get: Get a value from the store - Set: Set a value in the store - Clear: Clear chat history |
| Chat/Session Identifier | An identifier to individualize the chat/session. Used to scope stored data per user or session. |
| Store Key | The key to store/retrieve a value under/from. Required for "Get" and "Set" operations. |
| Store Value / GET Default Value | The value to store under the key (for "Set"), or the default value to return if the key does not exist (for "Get"). |
| Enable TTL | Whether to enable a time-to-live (TTL) for the key/value pair, so it will be deleted after the TTL expires. Only shown for "Get" and "Set". |
| TTL (Seconds) | The number of seconds before the key/value pair expires. Only shown if "Enable TTL" is true and operation is "Get" or "Set". |
| Keep Last # Messages | The number of messages to keep in the chat history when clearing. Only shown for the "Clear" operation. |
Output
- The output is a JSON object containing a field named
lola_store. - The structure of
lola_storeis a key-value map where each key corresponds to a stored value for the given chat/session. - For example:
{
"lola_store": {
"userPreference": "darkMode",
"lastMessage": "Hello!"
}
}
- When performing a "Get" or "Set", the specified key will be updated or retrieved in the
lola_storeobject. - When performing a "Clear", the chat history is cleared according to the specified parameters, and the resulting state is reflected in
lola_store.
Dependencies
- May require credentials for lolaKeyApi if configured.
- Relies on external Lola Store service endpoints via helper functions (
getValueFromL2Store,postValueFromL2Store,clearL2ChatHistory).
Troubleshooting
Common issues:
- Missing required fields: If "Store Key" is not provided for "Get" or "Set", the node may fail.
- Invalid TTL values: Providing non-numeric or negative values for TTL can cause errors.
- Incorrect Chat/Session Identifier: Using an incorrect or missing identifier may lead to data not being found or overwritten.
- API/Service errors: If the underlying Lola Store service is unavailable or misconfigured, operations may fail.
Error messages and resolutions:
- "Cannot read property 'value' of undefined" — Ensure the key exists when using "Get", or provide a default value.
- "Invalid TTL" — Check that TTL is a positive integer when enabled.
- "Missing required parameter: key" — Make sure to fill in the "Store Key" field for "Get" and "Set".
Links and References
- n8n Documentation
- Lola Store Service (if available)
- For further troubleshooting, consult your Lola Store service administrator or refer to n8n community forums.