I’ve created a chatbot workflow.
I understand that every question submitted by the user costs an execution. Totally fair.
But when I embed the chatbot window in my website (@n8n/chat - npm), it also costs an execution, since the chatbot is called with action “loadPreviousSession”.
If I embed the chatbot window on every pages of my site and a visitor navigates through 100 pages of my website and never use the chatbot, it’s counted as 100 executions!
Please share your workflow
Share the output returned by the last node
“If” statement gives “false” and process is stopped.
Thanks for reporting this! I agree that it’s not entirely fair for each chat to cost an execution, even when it’s not used. You could use a self-hosted version of n8n which has no execution limits. However, I’ve escalated this internally so the product team can discuss better solutions for cloud plan users looking to save on execution counts!
the problem is that the widget is trying to fetch previous chat sessions and hence triggers the execution.
However, we will address this internally and hopefully release this as a feature soon to either have an option to disable the fetch for previous sessions or make it so it only does that upon an actual message submission.
Please stay tuned, we will update the thread once the PR goes out.
I also have a problem with the previous chat session: from one page to another, either I don’t have the history, either I have all messages in double. I’ll create a specific post for this bug when I’ll succeed to pinpoint it.
I set the option to 10 last messages from the chat history (for the chat trigger node). But the entire chat history is still read. You can see it on the page in the browser. There is all the past correspondence, not just 10 entries.
By the way: For the “AI Agent” node, the memory depth setting works correctly. If you set 10 entries there, then on the 11th question he begins to forget what he said at the beginning of the conversation.
When we refresh the page (but do not yet open a dialog with the AI agent), the browser already reads the entire chat history. The browser accesses this via the specified web hook. This is not visible in n8n! That is, it is not displayed in the “Executions workflow” logs. Why is that? This complicates debugging.
By the way, when we ask the first question to the AI agent, this action gets into the “Executions workflow” logs. And then you can view this action in detail.