Skip to main content
Mastra v1 is coming in January 2026. Get ahead by starting new projects with the beta or upgrade your existing project today.

Workflow.then()

The .then() method creates a sequential dependency between workflow steps, ensuring steps execute in a specific order.

Usage exampleDirect link to Usage example

workflow.then(step1).then(step2);

ParametersDirect link to Parameters

step:

Step
The step instance that should execute after the previous step completes

ReturnsDirect link to Returns

workflow:

NewWorkflow
The workflow instance for method chaining

On this page