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:

1 Like

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