Execute JS
Run a sandboxed script. Input is args; the return value is on the pipe.
Type
utl.eval.js Block Utility
Folder
basic/utilityChannels
Any
Pipe
Value
Scope
Any
Execute JS runs a sandboxed script and writes the return value to the data pipe. Prefer built-in blocks (conditions, Evaluate Math, API) when they cover the step.
Configure
The Script editor can complete args (from Input) and ctx.get / ctx.set / ctx.unset for context variables. Names passed to ctx.set / ctx.unset must be valid Liquid and JavaScript identifiers, same as Set.
| Setting | Description |
|---|---|
| Name | Optional label on the canvas |
| Input (args) | Value or variable passed into the script as args |
| Script | Script body. Return the value that should go on the pipe |
| Output schema (optional) | Shape of the return value, so later blocks know the fields |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the script finishes |
Pipe schema
The next block reads this on the data pipe (pipe.value). The value is whatever the script returns — number, text, list, or object.
If you set Output schema as an object, those property names are the keys on pipe.value.
Use case
- Transform a nested object that other blocks cannot reshape.
- Set or read several context names in one step via
ctx.