The C# Script node runs a C# script as one step of a CloudRadial AutomationAI workflow, dispatched to a C# runner. It works the same way as the PowerShell Script node, differing only in the language and the runner flavor that executes it. This article is for workspace users with the Admin role or higher who build workflows in the Designer.
Reading Input and Emitting Output
Add a C# Script node from the Scripts section of the palette and edit it in the Designer's code editor. The runner SDK exposes a static Node class:
Node.GetInput()— reads the whole input bag. CallNode.GetInput("name")to read one value.Node.SetOutput(...)— sets this step's output. Pass an object; it becomes the node's JSON output object.
var userId = Node.GetInput("userId");
var all = Node.GetInput();
Node.SetOutput(new { users, count = 2 });
How input reaches a node and how other nodes reference this node's output are covered in the article on passing data between nodes with input and output JSON.
How the Script Runs
The C# runner compiles your script at run time using Roslyn script compilation. Because the script is compiled rather than precompiled, a compilation error surfaces when the step runs; the error appears in the step's logs.
Configuration Fields
The C# Script node carries the same configuration fields as the PowerShell Script node:
Name— the node's display label on the canvasTimeout (seconds)— how long the step may run, from 1 to 1800 seconds (default 1800)Retry count— how many times a failed step is retried, from 0 to 5 (default 0)- Explicit
parametersbindings — a list of name-and-expression pairs the script reads by name withNode.GetInput
The same step timeout model applies: a 5-minute default and a 30-minute hard cap. Split work that would exceed 30 minutes across multiple nodes. See the PowerShell Script node article for the full treatment of these shared fields.
Comments
0 comments
Please sign in to leave a comment.