Skip to main content
Workflows are defined using the Serverless Workflow DSL in YAML format. This reference covers the specification structure. For the full list of available tasks, see the Task Reference.

Specification structure

Document fields

The document block defines workflow metadata. Example:

Schedule

The optional schedule block configures automatic execution. CRON format:
Common expressions: Example:
Schedules are activated separately from workflow creation. Use the Schedule a workflow endpoint or set schedule_immediately: true when creating the workflow.

Task structure

The do block contains an ordered list of tasks. Each task is a YAML mapping with a unique name as the key. Tasks execute sequentially in the order they appear. Each task waits for the previous one to complete before starting. Example:

Task output

Every task produces a JSON object after execution. The output fields use camelCase names and vary by task — see the Task Reference for per-task output schemas. Within an export.as expression, . (dot) refers to the current task’s output. In ${…} variable expressions in the next task’s parameters, . also refers to the immediately preceding task’s output.

Export

The optional export block controls how a task’s output is merged into the workflow context — an object ($context) that accumulates data as the workflow runs. The context starts as an empty object {} and is threaded through every task. Available variables in export.as: When export is omitted, $context is unchanged. Examples: Store the entire task output as context:
Merge a single field into the existing context:
Build a running list of dataset IDs:

Variable expressions

Task parameters support ${…} variable expressions that inject values from previous task output or the workflow context. Variable expressions are evaluated before the task executes. Syntax rules: Available variables in ${…}: Use jq string interpolation \(expr) to embed values inside a string expression:

Supported tasks

The following tasks are available in workflows. See the Task Reference for full parameter details, constraints, and examples.

Complete example

A multi-step workflow that creates two materialized views and refreshes one, running daily:

Example with data passing

A workflow that creates a view, captures its dataset ID, and logs the result:
In this example:
  1. createView creates a materialized view and exports datasetId into $context.datasetId
  2. logCreatedDataset uses .datasetId (the previous task’s direct output) in a variable expression
  3. logFromContext uses $context.datasetId to access the same value via the workflow context

Task Reference

Full reference for all supported tasks

Automating Multi-Step Pipelines

Step-by-step guide to creating and running workflows

Workflow Orchestration

How workflows work and why they’re designed this way

Workflows API

REST API endpoints for managing workflows