Lola Store
AI-generatedOverview
The Lola Store node allows you to store, retrieve, and clear key-value data associated with a specific chat or session. This is useful for managing conversational state, persisting user-specific information, or maintaining chat history across multiple interactions in n8n workflows.
Common scenarios:
- Storing user preferences or temporary data during a chat session.
- Retrieving previously stored values to personalize responses.
- Clearing chat history while optionally retaining the last N messages.
Practical examples:
- Save a user's last selected language in a chatbot flow.
- Retrieve a shopping cart's contents for a returning user.
- Clear all but the most recent 5 messages from a support chat log.
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. |
| 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 (for "Set") or the default value to return if not found (for "Get"). |
| Enable TTL | Whether to enable 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 "Clear" operation. |
Output
- The output is an object containing a
lola_storefield within thejsonproperty. - The structure is as follows:
{
"lola_store": {
"<key>": "<value>"
}
}
<key>corresponds to the "Store Key" used in the operation.<value>is the result of the operation:- For "Get": the retrieved value (or the provided default if not found).
- For "Set": the value that was set.
- For "Clear": the value may be empty or reflect the cleared state.
Dependencies
- May require credentials named
lolaKeyApi(optional). - Relies on internal helper functions for storage operations.
- No external API keys are strictly required unless configured otherwise.
Troubleshooting
Common issues:
- Missing or incorrect "Store Key": If the key is missing or invalid, the operation may fail or return unexpected results.
- Invalid "Chat/Session Identifier": Using an incorrect identifier can lead to data being inaccessible or overwritten.
- TTL Misconfiguration: Setting TTL without enabling it, or providing non-numeric values, may cause errors or unexpected expiration behavior.
- Keep Last # Messages: Providing a non-integer or negative value may result in errors when clearing chat history.
Error messages and resolutions:
- "Cannot read property 'value' of undefined" — Ensure the key exists in the store for "Get" operations, or provide a default value.
- "Invalid TTL value" — Make sure TTL is a positive integer and "Enable TTL" is checked.
- "Required parameter missing: key" — Always provide a value for "Store Key" when using "Get" or "Set".
Links and References
- n8n Documentation
- n8n Custom Nodes Guide
- Lola Platform (if applicable) (if this refers to an external service named Lola)