Fail workflow run

The Fail workflow run action stops the execution of a workflow and marks the workflow run as failed with an error. When this action runs, all subsequent steps in the workflow stop, and the run displays as failed in the Run history page. This action is useful for stopping workflows when specific error conditions are detected, or when data validation fails.

Considerations

Workflow execution stops immediately

When the Fail workflow run action runs, the workflow stops immediately at that point. Any actions or conditions that follow in the workflow don't execute, even when they're within a different branch or conditional path.

Error visibility

Failed workflow runs display in the run history with an error status. Review the Run details to identify which workflows have failed, and check the reason provided in the failure message.

Fields

The Fail workflow run action contains the following fields:

Fields used in the Fail workflow run action.
FieldDescription
Failure messageRequired. The error message to display in the workflow run log. This message appears in the run details and helps identify why the workflow was stopped.

Triggers

The Fail workflow run action can be used in any workflow, regardless of the trigger that starts it. This action is useful for error handling and validation logic in workflows that need to enforce specific business rules or data requirements.

Example

A workflow is triggered when an order is created. The workflow checks if the order total is above a certain threshold that requires manager approval. If the order total exceeds $10,000 USD and no manager approval tag is present on the order, then the Fail workflow run action stops the workflow and records an error message indicating that manager approval is required.

This allows you to identify which orders need attention and prevent automated processing of high-value orders without proper authorization.