Skip to main content

Run JavaScript

Run JavaScript with Node.js, or with Windows' built-in JScript when Node.js is not installed.

Command in the Scripts toolkit · id ooa.script/run_javascript · 9 inputs, 4 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
ScriptStringNoScript text (or use file).
FileFileNoScript file (or use script).
ArgumentsListNoArguments passed to the script, one list item each.
InputStringNoText sent to the script's standard input (e.g. JSON).
Timeout (seconds)NumberNo300Maximum run time.
Fail on errorBooleanNotrueFail the step when the exit code is not 0.
Working folderFileNoFolder the script runs in; the workspace when empty.
EnvironmentDictionaryNoExtra environment variables for the script.
InterpreterStringNoNode.js program to use; node on the PATH when empty, and Windows' built-in JScript when Node.js is not installed.

Outputs​

OutputTypeWhat it is
outputStringStandard output.
error_outputStringStandard error.
exit_codeNumberExit code.
jsonAnyOutput parsed as JSON, when it is JSON.