Custom JS Trying to executeWorkflow with workflow id but getting workflow not found

I am trying to execute a workflow that calls itself to refresh the data on my page. I created a global workflow (in the Action menu) that checks my data, and then uses a setTimeout in a custom JS to call itself again with its workflow ID. It works once on page load, but then i get an error in the console saying workflow not found. When i try executing the JS command in the console, it finds the workflow and then keeps looping as expected.
Why doesn’t it find the workflow in the first execution context. Here’s the JS in the custom JS action i have:

setTimeout(() => { window.wwLib.executeWorkflow("9657722a-14e3-40a2-bad9-286a107716e3") }, 5000);```

Hi,
when are you starting the first call of your workflow? Best practise is to do it on a OnPageLoad workflow :slight_smile:

It’s weird, I have it in the Actions tab, it says “On Execution” in the trigger, and it practically is executed at page load. This morning, there’s no more error about workflow not found.

On execution means that it needs to be called somewhere. So you probably have an other one calling it somewhere.
You can use the find workflow button to find where

image