User Script
Run JavaScript, C#, or Python with typed inputs and JSON results.
AlphaUser Script is the Core → Scripting action for running JavaScript, C# or Python. Add named, typed input bindings and map returned JSON fields to runtime values or existing project variables. Code is literal; put field templates in input values, not in the code.
Example
Add an input named amount, set its type to number, and enter 6 as its value. In JavaScript, use this function body:
return { total: input.amount * 2 };
Add an output mapping from result field total, type number, to runtime.answer. Save the sequence and choose Test. The output mapping makes the value available to later actions.
Select JavaScript, C# or Python in the Language field. JavaScript receives an input object, C# receives a JsonObject, and Python receives a dict. Scripts return a JSON-serializable value; log.info() is available in all three languages. Input values use normal field substitution, while the code remains unchanged.
Output mappings can select a result field or nested path and save it to runtime.* or an existing vars.* project variable. Expected types are checked before mapped values are written.
After Test, inspect the action result in Runs.
Validation and limits
Syntax check only checks the code without resolving input values or executing it. A normal Test runs the script; execution has time and size limits, and the step's failure policy still applies.
When you add or edit code in the Editor, Core records approval for that exact script source on this PC. Review imported or otherwise unapproved scripts before activating their project. Approval is stored for the current Windows user and is not carried inside the project; changing the language or code creates a new source to review. JavaScript runs in a restricted JSON-only environment. C# and Python are trusted code and can use ordinary system APIs; worker limits do not make them an operating-system security sandbox. Run only code you trust.
See Error policies and Runtime Inspector for failures and script observations.