I am trying to load the previous session on a chat trigger node. the trigger node is embedded in our web app. I am also using a toolcall. it works just fine, I am able to call the tool call and display the previous messages. However. the data from google search is appended in the message when displayed in chat window. Makes the conversation messy. As solution to that, I hoped to insert the message manually using the chat memory manager node. However I am getting the issue: Key parameter is empty
Provide a key to use as session ID in the ‘Key’ parameter or use the ‘Connected Chat Trigger Node’ option to use the session ID from your Chat Trigger
Error Message:
Key parameter is empty
Provide a key to use as session ID in the ‘Key’ parameter or use the ‘Connected Chat Trigger Node’ option to use the session ID from your Chat Trigger
Thanks for sharing the screenshots — they make the root cause very clear.
The error happens because the Simple Memory node is receiving an empty or undefined Session ID (Key) at runtime. Your screenshots confirm this explicitly with the message:
“Key parameter is empty”
When this happens, n8n cannot create or retrieve chat memory, so the workflow fails immediately.
The expressions you tried (for example {{ $json.session.metadata.userId }} or {{ $json.chatKey }}) evaluate to undefined inside the Simple Memory node because that node does not automatically inherit the same JSON structure shown in the Chat Trigger UI output.
solution
Use the Connected Chat Trigger session ID and remove all manual expressions.
Steps
Open Chat Memory Manager
In Session ID:
Enable Use session ID from Connected Chat Trigger Node
Clear the Session ID field completely (leave it empty)
I think the error message is already very descriptive,
The issue is that the session ID is missing and since you’re using the embedded chat mode, you should double-check that the session key (or your metadata.userId) is correctly referenced and actually exists,
I’m not sure how your embedded chat is configured exactly, but according to the docs, these are the default settings:
So you should double-check and fix it so that it correctly points to your metadata.userId, and make sure to test it from the embedded chat interface UI, since this is where metadata.userId exists not from the n8n open chat test..