Integrations
Arrow
JavaScript Module
JavaScript Module

JavaScript Module

Run sandboxed JavaScript inside workflows to compute values, reshape payloads, and call allow-listed APIs.

Workflow Engine V 2.0.0

Description

What this does

The JavaScript Module exposes a single sandboxed Jint engine task. Scripts run in-process on the engine, see the full workflow context, and return when execution finishes — so you can compute derived variables, branch on logic the standard tasks don't cover, and reshape payloads inline.

Every script runs under strict mode with CLR import disabled, reflection blocked, eval/Function(string) disabled, and per-execution budgets for wall-clock time, statement count, recursion depth, and memory. Outbound HTTP via httpFetch is opt-in per environment, host-allow-listed, and SSRF-guarded against private/loopback addresses.

What you can build

  • Compute derived variables with JSTask — totals, hashes, formatted strings — before downstream tasks read them.
  • Reshape ContextPayload — flatten nested API responses, rename keys, drop fields.
  • Fine-grained branching — set session.TaskOutput or a routeKey for a downstream gateway to switch on.
  • Inline validation — fail the task or set context.error to route a bad reply to an error flow.
  • Allow-listed outbound HTTP — call a partner API via httpFetch, parse the JSON, lift a few fields into context.

See the setup guide for configuration and full task reference.