Chat until conditions are met

Is it possible to have a workflow that uses chatbot (s) that 1) references a database to answer chat inquiries and 2) Ask for chat user’s first name, email etc? 3) once the chat has user details it will go to the next step.

Yes, this is possible.
You can use the Chat trigger Node, connect a database where you store the requested values like Name, Email with the chatsessionid and route the Answer accordingly. If the fields are not populated, ask for them, if they are populated, route to the AI Agent. The Agent can be connected to so called tools and Vector databases.

If you have a knowledge base, put it into a vector database. If you want to check things like order status, etc. you can connect a tool that is quering a database.

If you provide more information on what you want to do exactly, I can provide an example of a workflow or help you building one.

The issue I am seeing is that the second AI agent 'Error in sub-node ‘Window Buffer Memory1’. Im not sure how to share the window memory.

This would be my approach to make 100% sure that you receive the correct data from the user. Or even better: alter the chat widget so that the user has to fill out a form before starting the chat.

1 Like

And one more thing regarding your issue with the chat storage/context:

When using {{ $json.sessionId }} you are referring to the output of your previous node.
In your case the first Agent is outputting someting like:

{
“output”: “AI reply”
}

This is why your second AI Agent node can’t refer to {{ $json.sessionId }}

Just refer to {{ $(‘When chat message received’).item.json.sessionId }} in the storage node instead.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.