Need help running different asynchronous javascript actions one after the other

I am trying to run 3 javascript workflows, they have async functions inside and I have put await statements to make the code synchronous and each individual block works exactly as desired but, the next workflow doesn’t wait for the previous one to finish executing. I tried disable the asynchrounous option but it still does the same. Can someone please help me with this.

Have you tried placing each run function in a custom workflow?

Create a custom event and add the second JS inside it. Once the first JS runs then trigger the custom event with second JS. Same way for third.

@lantzgould @alan.thomas111997
I tried putting javascript into a custom event. Basically I want to show a loader before this workflow starts and hide the loader once it completes.

create_summary contains the javascript code to be run.

PS: Thank you so much, with this hint I figured out a solution. I published a value to a JavascriptToBubble element after the javascript function is run and triggered a workflow through it which hides the loader.

This topic was automatically closed after 70 days. New replies are no longer allowed.