Hi! I’m using the @n8n/chat widget on my website with the embedded mode and a chatbot workflow built in n8n.
The problem:
Each time a user loads the page (even without opening or interacting with the chat), the Chat Trigger
(or even plain Webhook
) node fires immediately and consumes an execution.
This happens even though:
- I’m using
startOnLoad: false
- I removed
initialMessages
- I only send messages via
onStart()
after the user clicks “Get Started” - I’ve also tested
loadPreviousSession: false
– but still getting executions on page load
Goal:
I want to trigger the workflow only after the user actually sends their first message, not before.
What I’ve tried:
Chat Trigger
with and without memory- Switched to
Webhook
node instead of Chat Trigger onStart()
instead ofinitialMessages
- Tried to inspect the payload – it still fires on
loadPreviousSession
- Also tried filtering it in a Function node (based on
action
) – still counts as an execution
What I’m asking:
Is there a way to completely avoid any execution until the user sends a message?
Or alternatively:
- Is there a flag to prevent even the
loadPreviousSession
call? - Is there a way to lazy-load the widget entirely?
Thank you in advance
I’m building a product-facing AI chatbot and want to avoid burning execution units on page visits.