Browse documentation

Workflow node reference

Function

Call a custom JavaScript function deployed on Cloudflare Workers. Exact configuration, outputs, execution behavior, errors, limits, and examples for the Function workflow node.

Automation buildersAdvancedAvailable

What this guide covers

  • Category: Integrations.
  • Use it to call a deployed Yanola Function and route through success or error.
  • 2 configuration fields and 5 documented outputs.
  • Custom code requires developer review and can create external side effects.

What this node does

Call a custom JavaScript function deployed on Cloudflare Workers

Use it to call a deployed Yanola Function and route through success or error.

When not to use it

Do not use it when a supported App Action or simple Set Variable can perform the task.

Prerequisites

  1. Function created and Deployed
  2. Valid input mapping
  3. Secrets stored in Environment Secrets
  4. Timeout from 1 to 60 seconds

Inputs and configuration fields

Function configuration fields
FieldKeyControl / typeRequirementDefaultAccepted values and behavior
Functionfunction_idselectRequired when shownNo defaultChoose which function to execute. Only deployed functions are shown.. Select a function
Timeout (ms)timeout_msnumberOptional30000Maximum time to wait for function response (1-60 seconds). minimum 1000; maximum 60000

Configure the node

  1. Drag Function from Integrations in the node palette.
  2. Select the node to open its configuration drawer.
  3. Complete every required field and any conditional field revealed by your choices.
  4. Insert variables only from the current trigger or an earlier node on the same path.
  5. Connect every required output handle to the intended next step.
  6. Save and run Workflow Test with representative data before activation.

Outputs

Later nodes can use these values only after this node has run successfully on the same execution path.

Function output variables
VariableTypeMeaning
{{nodes.function.result}}objectThe data returned by your function
{{nodes.function.status_code}}numberHTTP status code from the function response
{{nodes.function.duration_ms}}numberHow long the function took to execute
{{nodes.function.success}}booleanWhether the function executed successfully
{{nodes.function.error}}stringError message if the function failed

Execution behavior

  1. Invokes the selected deployed function with mapped input.
  2. Waits up to the configured timeout.
  3. Emits result, status, duration, success, and error, then selects success or error path.

Example use case

Normalize an external order payload before updating a contact and replying.

Complete workflow pattern
text
Webhook → Function → Condition → Update Contact → Send Template

Common errors

Function common errors
SymptomResolution
Function is unavailableDeploy it successfully and refresh the picker.
Invocation times outReduce work or adjust timeout within 1–60 seconds.
Error branch runsInspect function test/log and returned error before retrying.

Limitations

Custom code requires developer review and can create external side effects.

Workflow Test should not replace Function's own JSON tests.