How to execute JavaScript code in a workflow?

Someone knows how to do that?

I am not interested to execute on page load but in the workflow. It could be triggered based on condition.

I am wondering if displaydata could here? In order to execute JS with data from bubble.

Thanks

Create a HTML element, put in a javascript section. If the javascript refers to a dynamic value, by using Bubble’s editor “Insert Dynamic Data”, it will be run once on page load and again every time the dynamic value changes.

I recommend formatting the dynamic value as a string, and then putting quotes around it in the javascript, to avoid a syntax error if the value is empty.

To initiate it from the workflow, do an action to change the dynamic value. A good example is setting an element’s custom state.

Here’s an example:

1 Like

I would like to call native code thru JavaScript. @emmanuel

@natedogg,

We don’t support this yet.

i like to word “yet” :smiley:

Thanks so much. We tried and it worked Well!