Skip to main content

Overview

Schemas define the data contract between users and workflows:
  • Input schemas define what the user fills in before triggering a workflow (forms)
  • Output schemas define what the workflow returns after execution (results)
Both are defined in config.ts as part of the workflow configuration.

Input schemas

Input schemas are used by HTTP triggers and sub-workflow triggers to define what data the workflow expects.

Structure

An input schema is an array of sections, each containing an array of fields:

Field types

Common field properties

File upload field

Select field

Array field

Output schemas

Output schemas define the structure of execution results. They apply to all trigger types.

Structure

An output schema is a flat array of field definitions:

Output field types

Sub-workflow output schema

Sub-workflows always have an empty output schema:
Data flows back to the parent workflow via the Execute Workflow node’s return value.

Connecting schemas to workflow nodes

Input data in workflows

For HTTP triggers, the user’s form data arrives in the webhook payload. Extract it in a Code node:

Output data in workflows

The Codika Submit Result node sends the resultData back. It must match the output schema:

Validation

The CLI validates schemas via the schema-types use-case script:
Checks:
  • All field types are valid
  • Required properties are present
  • itemField is defined for array types
  • Keys use valid naming conventions