> Discover all available pages from the documentation index: https://mastra.ai/llms.txt

# Workflow\.commit()

The `.commit()` method finalizes the workflow and returns the final result.

## Usage example

```typescript
workflow.then(step1).commit()
```

## Returns

**workflow** (`Workflow`): The workflow instance for method chaining

## Related

- [Control Flow](https://mastra.ai/docs/workflows/control-flow)