Skip to main content

Evaluate JavaScript expression

Evaluate a JavaScript expression and return the result. This action can be used to perform calculations, string manipulations, boolean operations, and other JavaScript computations.

Application

  • Code

Inputs (what you have)

NameDescriptionData TypeRequired?Example
JavaScript expression to evaluateA JavaScript expression that can be evaluated to produce a result. Example: 1 + 1Text (Long)Yes1 + 1

Configuration Details

The “Evaluate JavaScript Expression” Wrk Action supports running standard JavaScript code, including most built-in functions and syntax.

It embeds the V8 JavaScript engine, which means it should support modern ECMAScript language features such as let, const, arrow functions, object destructuring, array methods (map, filter, etc.), and JSON parsing.

You can call standard JavaScript global functions directly, including Math.*, JSON.stringify, Date, parseInt, and others.

Notes & Limitations

  • No browser APIs – Functions like window, document, fetch, setTimeout, and other DOM-related APIs are not available.
  • No Node.js APIs – You cannot use require(), fs, process, or other Node-specific modules.

Outputs (what you get)

NameDescriptionData TypeRequired?Example
Evaluation resultThe result of evaluating the JavaScript expression. Example: 2Text (Long)No2

Outcomes

NameDescription
SuccessThis status is selected if the job has successfully completed.

Requirements

  • N/A