Skip to main content
The Serverless Function node runs your own code. Pick a runtime, define named inputs that map data from upstream nodes, and write a function body. Whatever you return becomes the node’s result, which downstream nodes reference as {{code-id.result}}.
For a one-off string or number transform, you may not need this node at all, write an inline expression directly in the field instead, e.g. {{ $('form').email.split("@")[1] }}.

Inputs

Function Inputs is a list of name + value pairs. The value is usually a reference like {{sheets-1.values}}. Each input is then available in your code under its own name, so an input named data is just data. This works the same in both runtimes: Python passes it as a function argument, and JavaScript binds it as a variable, where it is also still on the inputs object as inputs.data. Declaring your own const data = ... in JavaScript takes precedence over the input of the same name, so nothing breaks if the names collide. To pull an upstream value straight into your code without declaring an input, wrap the reference in quotes: const x = Number("{{ $('form').amount }}"). The substitution is textual, so a bare $('form') outside the braces is an error at run time.

JavaScript

Runs in QuickJS and starts in milliseconds, so it’s the right choice for quick data transformations. Pure JavaScript only: no npm packages, no network access, and a 3 second execution limit. console.log output is captured as stdout.

Python

Runs in a cloud sandbox with installable pip packages and optional GPUs. Use it for heavy computation, ML workloads, or anything that needs libraries. This sandbox is NoClick’s compute, so a Python run costs credits based on the CPU, memory, and GPU you reserve and how long it runs, billed even if the run errors or times out. JavaScript runs in-process and is free. See What costs credits.
Need values to persist between runs (counters, seen IDs)? Connect a State Manager node to get a mutable state parameter that saves automatically.

Next steps