---
title: "Reference: Workflow.commit() | Workflows"
description: Documentation for the `Workflow.commit()` method in workflows, which finalizes the workflow and returns the final result.
packages:
  - "@mastra/core"
---

# Workflow.commit()

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

## Usage example

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

## Returns

<PropertiesTable
  content={[
    {
      name: "workflow",
      type: "Workflow",
      description: "The workflow instance for method chaining",
    },
  ]}
/>

## Related

- [Control Flow](/docs/v1/workflows/control-flow)
