Skip to main content
Node type: code · Version: 1 · Category: Data Author a source block or migrate it to a dedicated Code node. sndbox classifies this node as side-effecting, so tests or automatic runs can require additional confirmation and permission review.

When to use this node

  • Transform data when built-in mapping and parser nodes are not enough.
  • Author reusable HTML, JavaScript, or CSS source for Web Builder.

Example: Transform mapped JSON with JavaScript

Run JavaScript locally, reading the mapped value from SNDBOX_INPUT and printing a JSON result.
Example settings
This shows the important settings, not a complete exported node. Local paths must be selected, mapped from a trusted path, or covered by the runner’s approved boundary.
  1. Map the source value to input.
  2. Run in the full editor and resolve diagnostics.
  3. Inspect result, stdout, and exit behavior before connecting downstream nodes.

Configuration

Edit code opens a dedicated editor for Python, HTML, JavaScript, and CSS with syntax highlighting, live syntax and basic type diagnostics, line and column locations, and AI-assisted code writing.
Source mode returns the complete file through code without executing it. HTML and CSS always use source mode.
Run mode is available for Python and JavaScript, requires command-execution approval, invokes the installed python or node executable, and waits for completion. Mapped input is available as JSON in SNDBOX_INPUT.
Source is limited to 2 MB, timeout is clamped to 100–120000 milliseconds, and captured standard output and error are each limited to 64 KiB.

Workflow JSON

The editor stores this node with the following implemented default configuration:
Default node configuration
Values may be entered literally or mapped from an earlier compatible output when the inspector exposes a mapping control. See Variables and data mapping.

Inputs

Outputs

Execution behavior

  • Source mode returns the file without executing it; HTML and CSS always use source mode.
  • Run mode invokes the installed node or python executable and requires command-execution approval.
  • The editor catalogue declares code (string), result (any) for mapping. The execution inspector can contain additional evidence fields; inspect a real result before selecting nested paths from object or any outputs.

Common issues

  • SNDBOX_INPUT is a JSON string, so parse it before treating it as an object.
  • Keep secrets out of source and stdout because both can appear in workflow or execution records.

Where it can run

  • Desktop local runner
  • Paired self-hosted runner
  • Hosted runner

Test and inspect

Use Test node in the editor to preview this step with the current configuration. A full run records resolved inputs, outputs, logs, duration, and any artifacts in the execution inspector. Side-effecting or destructive nodes can require an additional confirmation or approved workflow permission.