Skip to main content
Functions are reusable graph resources. They keep the main automation small and let you test one piece of behavior without running the entire graph.

Choose A Function Scope

Account functions appear in the special Account Functions folder. Local and account functions can each use nested folders. Drag functions and folders to reorganize them within the same scope. Choose the scope when creating or importing the function. Functions and folders can move within their current scope, but a local function cannot be moved into Account Functions, and an account function cannot be moved into a local graph. To change scope, create or import a separate function in the intended location and update callers deliberately.

Choose Pure Or Impure

A pure function can be evaluated whenever another node needs its output. An impure function has execution connections that determine when it runs.

Create A Function

1

Open Build

In the graph editor, select Build, then find Functions.
2

Choose the destination

Use the add menu at the function root or inside a folder. Choose a local or account function.
3

Describe the responsibility

Give the function a focused name and description. Choose Pure or Impure, and optionally assign a folder.
4

Define its boundary

Add named inputs and outputs in the function’s Build tab. Set each value’s type, structure, nullability, and input default where appropriate.
5

Build between Entry and Return

Connect input values from Function Entry through the function’s nodes, then connect results to Function Return. Impure functions also connect the execution path.
6

Save and test

Save the function version, then use Tests to verify inputs, outputs, and any expected effects.
After saving, the function appears in the same resource selector as the main graph. Its Build tab holds the named boundary and its canvas holds the implementation, so callers only need to work with the declared inputs and outputs.

Call A Function

From the main graph or another compatible function:
  1. Find the function under Build > Functions.
  2. Insert its call on the canvas.
  3. Connect the required inputs and use its outputs.
  4. For an impure function, also connect its execution input and Then output.
Function calls use the selected saved function version. Creating a newer function version does not silently change existing calls. Inspect a call before upgrading it, especially when inputs or outputs changed.

Pass Values Into A Function

Local and account functions follow the same boundary rule: they do not automatically read variables from the root graph or calling function. Variables created inside a function belong to that function. When a function needs a caller’s variable:
  1. Add a function input with the same type and structure.
  2. Insert Get Variable in the calling graph.
  3. Connect its value output to the matching function-call input.
An input is optional at a call only when it has an explicit default value. Marking an input as nullable allows null, but does not make the input optional. A nullable input with no default still needs a connection at every call site.

Change A Function Safely

Changing an input, output, or mode can affect call sites and saved tests. The editor shows the expected impact before applying a breaking boundary change.
  • Add explicit value defaults when callers may safely omit an input.
  • Keep output meanings stable across versions.
  • Create a new version before a major change.
  • Run the function tests and every parent graph test after upgrading calls.
  • Archive an obsolete function to remove it from new-call menus. Existing saved calls keep their pinned behavior.
A function can be used by multiple graphs. Review call-site impact and create a new version instead of changing shared behavior in place.

Test A Function

Pure function tests provide inputs and check selected output values. Impure function tests compare the complete expected-effect list exactly, including effect count and order. Blank output fields are ignored, which lets one test focus on only the outputs that matter. Tests belong to an exact function version. Save changes before running them so results match the version under review. See Testing for graph tests and effect assertions.