function

YAML configuration reference for Function blocks

Schema Definition

type: object
required:
  - type
  - name
  - inputs
properties:
  type:
    type: string
    enum: [function]
    description: Block type identifier
  name:
    type: string
    description: Display name for this function block
  inputs:
    type: object
    required:
      - code
    properties:
      code:
        type: string
        description: JavaScript/TypeScript code to execute (multiline string)
      timeout:
        type: number
        description: Maximum execution time in milliseconds
        default: 30000
        minimum: 1000
        maximum: 300000
  connections:
    type: object
    properties:
      success:
        type: string
        description: Target block ID for successful execution
      error:
        type: string
        description: Target block ID for error handling

Connection Configuration

Connections define where the workflow goes based on execution results:

Examples

Simple Validation

Data Processing

API Integration

Calculations

Was this helpful?