Embeded chat costs a lot even when not used

Describe the problem/error/question

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.

Information on your n8n setup

  • n8n version: 1.63.4
  • Database (default: SQLite): cloud
  • n8n EXECUTIONS_PROCESS setting (default: own, main): cloud
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: cloud

Hi @PhunkyBob,

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!

Thank you.

I am having this same issue. I am being charged an execution even if the bot is never opened. How can I stop this?

Same here.
I need to remove my chatbot on my website because it uses all my credits for nothing.

Hi guys,

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. :pray:

Nice!

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.

1 Like

Hi @PhunkyBob

You can now disable the loading of previous sessions by setting loadPreviousSession to false.

I have just updated the documentation and will update the npm package next week as well.

Hope this helps! :slight_smile:

2 Likes

New version [email protected] got released which includes the GitHub PR 13132.

1 Like

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.

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