Data and file nodes
HTML Extractreads HTML (a string, or thedatafield of the input) with CSS selectors. Each selector gives one key. Return the text, the HTML, an attribute, or thevalue.Return Arraygives every match.XMLturns XML into JSON and JSON into XML. Attributes use the prefix@_and mixed text uses#text. Both can be changed.RSS Readfetches an RSS 2.0, RSS 1.0, or Atom feed and returns one item for each entry.Convert to Filemakes a CSV, JSON, or text file from items.Extract from Filereads them back. The file is base64 text inbinary.<property>of the item. There is no separate binary store.Compressionmakes or opens a gzip file. Zip is not supported.Read/Write Files from Diskreads a file into a binary field, or writes one to disk. It reaches only the folder inZERODOT_FILES_DIRon the worker. With the variable empty, the node is off. A path that leaves the folder (..or a symbolic link) fails.Execute Commandruns a shell command on the worker and returnsexitCode,stdout, andstderr. It is off unlessZERODOT_ENABLE_EXECUTE_COMMAND=true, because everyone who can edit a workflow could run commands on the worker. In Docker, the command runs inside the worker container.Stop and Errorfails the run with a message or themessagefield of an object. It has no output, so the error workflow andonErrorof the run see it.
If node
- The
Ifnode sends items to thetrueoutput or thefalseoutput. - Each condition has two values and an operator. Click Add Condition to add more conditions.
- Choose And or Or to join the conditions. And: all conditions must be true. Or: one true condition is enough. The choice applies to all conditions.
- With no conditions, the node uses the
falseoutput. - Every row is evaluated. To guard a field that can be missing, put both checks in one row, for example
{{ $input.a != null && $input.a.b > 1 }}. - In the saved workflow, one condition is an expression, for example
{{ $input.status == 200 }}. Many conditions are{ "combinator": "and" | "or", "conditions": ["{{ ... }}", ...] }. - An n8n
Ifnode with many conditions imports as many conditions with the same join.
Code node
The Code node runs JavaScript in a separate sandbox container (isolated-vm). The code can read $input, $trigger, $node["Name"].data, $vars (read only), and $run. It has no network, no file access, and no Node API. A run stops after timeoutMs and at 128 MB of memory.
Calls to console.log, console.info, console.warn, console.error, and console.debug show under "Logs" for the node on the run page, also when the code fails. A run keeps the first 100 logs, and 2000 characters of each log.
Scale the sandbox
One sandbox container runs SANDBOX_MAX_CONCURRENCY (default 4) pieces of code at the same time. For more, run more replicas:
SANDBOX_REPLICAS=3 docker compose up -d # or: docker compose up -d --scale sandbox=3
SANDBOX_URLon the worker can be one URL, a host name with many addresses (Docker DNS of a scaled service), or a comma-separated list:http://sandbox-1:3002,http://sandbox-2:3002. The worker sends each run to the replica with the fewest runs in flight, and the replicas take turns when they are equal. The worker looks up DNS again every 5 seconds.- A full sandbox does not queue for long. It waits at most
SANDBOX_MAX_WAIT_MS(default 250) with at mostSANDBOX_MAX_QUEUE(default:SANDBOX_MAX_CONCURRENCY) waiting requests. Then it answers503withRetry-After(SANDBOX_RETRY_AFTER_SECONDS, default 0: the worker then uses its own short backoff). - On
503, or when a replica does not connect, the worker waits a random time (backoff, up to 2 seconds) and tries again, on another replica if there is one. After 30 seconds or 10 tries, the Code node fails with "The code sandbox is busy. Try again later". GET /healthzis the health check.GET /metricsshowszerodot_sandbox_active,zerodot_sandbox_queued,zerodot_sandbox_max_concurrency,zerodot_sandbox_runs_total, andzerodot_sandbox_rejected_totalin Prometheus format. A growingrejected_totalmeans: add replicas.- The isolation stays the same for each replica: only the internal network (no way out), read-only file system, all capabilities dropped, no volumes.
The code that you write in a Code node is yours. It is not a derivative work of zerodot, and the AGPL does not apply to it.