runScript

The runScript the command allows you to call a JavaScript file from within your flow.

Take a look at our JavaScript docs for guidance on how to use this feature.

Examples

To run another flow configured in Moropo

- runScript:
    file: javascript.js   # name of the javascript file in Moropo + .js

Use within your script

- launchApp
...
- runScript:
    file: javascript.js
...

Passing environment variables

- runScript:
    file: javascript.js
    env:
      SOME_KEY: "my value"

Outputs

The results of a runScript can returned and accessed later in a flow.

Consider a javascript file which returns two unique strings of text

These could then be accessed later in the flow

Last updated

Was this helpful?