How to Pass SessionId to Chat Memory Manager?
Hey all, I have a question for you.
I'm building out a chatbot in n8n. Attached is an image of what I have so far.
The use case is an ecom store. I have Airtable and Pinecone setup so that the chatbot can retrieve customer data and information like blog posts, product specs, and warranty and shipping info. Everything worked great up to this point.
What I'd like to do next is - at the end of the conversation - ask for the visitor's email so that I can add them to my list and then send them the details of our conversation.
The problem I'm running into is that the AI agent only passes the last part of the conversation, so it's tough to get the exact part with the email, links, etc.
I tried to add the Chat Memory Manager node so I could access the full conversation, but I keep getting an error saying the sessionId isn't available. And that's because it gets passed from the trigger through the agent to the memory buffer, but not back to and through the agent. So I'm unable to get the entire chat history.
My questions:
  • Is there another way to get the entire chat history?
  • If not, is there a way to pass the sessionId to the other side of the agent so that I can get the entire chat history?
I did work with ChatGPT to create a setup with a Set node, couple code nodes, and merge node and got most of the way there, but then it returned the entire chatbot conversation within an object and that's what showed up in the chat. I wasn't able to extract just the raw conversation.
Any thoughts or pointers appreciated. TIA!
-Matt
12
14 comments
Matt Geer
3
How to Pass SessionId to Chat Memory Manager?
AI Automation Society
skool.com/ai-automation-society
A community built to master no-code AI automations. Join to learn, discuss, and build the systems that will shape the future of work.
Leaderboard (30-day)
Powered by