Overview
The Symbiosika Chat Session Store node manages chat sessions by storing, retrieving, and deleting session data identified by unique session IDs. It is useful in scenarios where chat applications or workflows need to maintain stateful information across multiple interactions, such as preserving user context or session metadata between messages.
Practical examples include:
- Storing a chat session with an associated chat ID when a new conversation starts.
- Retrieving session details to continue a conversation seamlessly.
- Deleting expired or obsolete sessions to free up resources.
Properties
Name | Meaning |
---|---|
Operation | The action to perform: Store Session , Get Session , or Delete Session . |
Session ID | A unique identifier for the chat session. |
Chat ID | (Only for storing) The chat ID to associate with the session. |
Session Duration (Minutes) | (For storing and getting) How long a session remains valid after last use, in minutes. |
Output
The node outputs JSON objects that extend the input data with operation results:
- For Store Session:
operation
:"stored"
chatId
: The stored chat ID
- For Get Session:
operation
: One of"retrieved"
,"expired"
, or"not_found"
chatId
: The chat ID if retrieved successfullylastUsed
: Timestamp of the last access time (when retrieved)valid
: Boolean indicating if the session is still valid
- For Delete Session:
operation
:"deleted"
existed
: Boolean indicating if the session existed before deletion
If an error occurs and "Continue On Fail" is enabled, the output includes an error
field describing the issue.
Dependencies
- This node uses an internal in-memory Map object to store sessions during runtime.
- No external services or API keys are required.
- Sessions are ephemeral and will not persist beyond the node's runtime environment.
Troubleshooting
- No session ID provided: The node requires a session ID for all operations; ensure this property is set.
- No chat ID provided when storing: When storing a session, a chat ID must be supplied either via input data or the node parameter.
- Session expired or not found: When retrieving, if the session duration has passed since last use, the session is deleted and marked as expired.
- Data persistence: Since sessions are stored in memory, restarting n8n or the node will clear all stored sessions. Use external storage if persistence is needed.