Each time the page loads, an initialization request to the webhook is made.
I have two issues:
The initial request with the initialization results in a 500 error in my workflow because the AI agent doesn’t have a prompt. I tried adding an “IF” module to only trigger the AI when the sendMessage action is used, but it still throws a 500 error since no response data is provided.
How do you handle these initial calls?
Since I’ve implemented the widget on a page with high traffic, I don’t want the workflow runs to be consumed by these initialization calls.
Is there a way to disable this? Or can I configure it to initialize only when the user clicks on the chat widget?