tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

Workflow Error Handling: Catch Failures, Alert, and Recover

FlowMattic workflow error handling: when a workflow fails, the Workflow Failed trigger starts a second workflow that posts the error to Slack.

Workflow error handling decides what happens when a step fails: whether the run stops, who hears about it, and how you put it right. FlowMattic gives you the pieces to handle errors inside your workflows instead of finding out from a customer: a Workflow Failed trigger that starts an alert workflow, a Stop and Error step that fails a run on your own rules, per-step Ignore Errors, failure emails and an error webhook, and Task History to recover.

This guide is for anyone running workflows that matter: store owners whose orders flow through automations, agencies that look after client sites, and teams whose CRM or support desk depends on a sync. You will see how FlowMattic decides that a run failed, how to send that failure to Slack, Discord or anywhere else, and how to re-run the work once the cause is fixed.

What is workflow error handling in FlowMattic?

It is not one setting but a set of tools that work together. Each one sits where you would expect it:

  • Workflow Failed trigger, from the Workflow Error by FlowMattic app. It fires when another workflow fails and hands your error-handling workflow the details.
  • Stop and Error, an action in FlowMattic Tools (new in 7.3.0). It ends the run at that step and marks it failed with your message.
  • Ignore Errors, a checkbox on every action step’s Conditions tab, for steps whose failure should not count.
  • Failed Task Notifications in FlowMattic settings: Enable Notifications, Notification Email and a global Error Webhook URL.
  • Error handling settings on each API by FlowMattic step, for HTTP calls.
  • Task History, where every failed run can be re-executed, or re-run from a chosen step.

How FlowMattic decides a run failed

A step fails when it returns an error status. Common causes are an API that answers with a non-2xx code, an app that rejects the data, a step saved without an event, a PHP error inside the step, and a Stop and Error step.

By default, a failed step does not stop the run. The steps after it still execute, and the run is recorded as Failed, or Partial Failed when other steps succeeded. A run stops at the failed step when the step asks for it: Stop and Error always does, an API by FlowMattic step does when Continue Workflow on Error is set to No – Stop workflow, and so does a step that hits a PHP error.

Two things are not failures. A Filter that stops a run ends it quietly, and a step with Ignore Errors ticked has its error status changed to success (except Stop and Error, which always fails the run).

When a run ends with at least one failed step, FlowMattic does three things: it sends the failure email if notifications are enabled, posts a JSON payload to the global Error Webhook URL if you set one, and fires the Workflow Failed trigger for every active error-handling workflow.

Setting up workflow error handling, step by step

1. Build an error-handling workflow

  1. Create a workflow and choose Workflow Error by FlowMattic as the trigger, with the Workflow Failed event.
  2. Leave Monitor Specific Workflow empty to hear about every workflow, or enter one workflow’s ID to watch only that one. The ID is the workflow-id value in the builder’s address bar.
  3. Capture. Because failures happen at random, the trigger loads realistic sample data straight away, so you can map fields without waiting for a real failure.
  4. Add the alert step: Slack Send Channel Message, Discord Send Channel Message, Send Email, or an API call to your paging tool. Map fields such as workflow_name, error_message and workflow_url.
  5. Turn the workflow on.
FlowMattic builder showing the Workflow Error by FlowMattic trigger, Workflow Failed event, with the Monitor Specific Workflow field and the list of available data fields.
An error-handling workflow: the Workflow Failed trigger with Monitor Specific Workflow left empty to watch every workflow.

2. Fail runs that break your rules

Some problems are not errors to the app. An order with no shipping address is a perfectly valid order. Put a Stop and Error step on the path that catches it, usually after a Router or Branch, and write the reason in Error Message. The field takes dynamic data, for example Order {woocommerce1.id} has no shipping address.

The run stops there and is marked failed with that message, even inside an Iterator, where the steps after Iterator End don’t run either. Task History, the failure email and the Workflow Failed trigger all report it. Leave the message empty and the step reports “The workflow was stopped by a Stop and Error step.”

FlowMattic Tools Stop and Error action with the Error Message field filled with a dynamic order number.
The Stop and Error step from FlowMattic Tools, ending the run as failed with a message that names the order.

3. Decide which failures count

Open any action step, go to the Conditions tab and tick Ignore Errors for steps that are nice to have, such as a courtesy Slack post. The step’s error is recorded as success, the run is not marked failed because of it, and no failure email is sent for it.

4. Set site-wide failure notifications

In FlowMattic settings, under Notification Settings and Failed Task Notifications, set Enable Notifications to Enabled and add a Notification Email. If the address is empty, the site’s admin email is used. The Error Webhook URL receives every failure as a JSON POST with an X-FlowMattic-Event: workflow_failed header, so alerts still arrive when the site’s email is not working.

5. Recover from Task History

Once the cause is fixed, open the run in Task History. Re-execute runs the workflow again with the original trigger data, or with fields you edit first. On a single step, Re-run this step only repeats just that step, and Run from this step continues the workflow from there as a new Task History entry. Steps inside an Iterator cannot be a starting point.

Data the Workflow Failed trigger provides

FieldWhat it holds
error_messageSummary of every failed step, as app: message, separated by ” | “
workflow_name, workflow_id, workflow_urlThe failed workflow and a direct admin link to it
first_error_app, first_error_stepThe app and step title of the first failed step
first_error_messageThat step’s error message
first_error_code, first_error_typeHTTP status code and error type when the step reports them, such as 429 and rate_limit
failed_stepsJSON array with the details of every failed step
total_steps, failed_step_countHow many steps the workflow has and how many failed
task_history_idThe run’s Task History ID
site_url, site_name, timestampWhere and when it happened
error_severitySeverity label

Use cases

A Slack alert for every failed run

An agency managing Northwind’s site wants to know about any failure before the client does. One error-handling workflow watches all workflows and posts the name, error and link to the team channel.

Flow: Workflow Failed → Slack Send Channel Message

Page the owner of one critical workflow

Acme’s order-to-warehouse workflow cannot wait for someone to check email. A second error workflow uses Monitor Specific Workflow with that workflow’s ID and sends a Discord message to the on-call channel.

Flow: Workflow Failed (one workflow ID) → Discord Send Channel Message

Fail orders that cannot be shipped

An order without a shipping address should not reach the fulfilment API. A Branch checks the address; the empty path ends in Stop and Error with the order number in the message, and the Slack alert workflow above picks it up.

Flow: WooCommerce New Order Created → Branch → Stop and Error

A failure log for the weekly review

An operations team wants trends, not just alerts. Each failure becomes a row in a WP Table with the workflow, step, code and time, so recurring problems stand out.

Flow: Workflow Failed → WP Tables New Record

Route rate limits away from the pager

A SaaS team treats an API rate limit differently from a broken integration. A Router reads first_error_type: rate limits go to a low-priority channel, everything else emails Yuki Tanaka on call.

Flow: Workflow Failed → Router → Slack Send Channel Message · Send Email

Plain-English failure summaries with AI

Raw error payloads are hard for a support lead to read. An AI agent turns failed_steps into a short explanation and a suggested fix before the email goes out.

Flow: Workflow Failed → AI Agent Execute Agent → Send Email

Keep a courtesy step from failing a sale

A lead workflow creates the CRM contact, then posts to Slack. If Slack is briefly unavailable, the lead is still captured; Ignore Errors on the Slack step keeps the run green.

Flow: Form Builder New Form Submission → HubSpot Create Contact → Slack Send Channel Message (Ignore Errors)

Tips and gotchas

  • Error workflows do not alert on themselves. A Workflow Failed workflow never fires for its own failure, and while error workflows are running, a failure among them does not start another round. Keep them short and dependable.
  • They must be switched on. An error-handling workflow that is turned off is skipped.
  • Ignore Errors does not cancel Stop and Error. A Stop and Error step stops the run on purpose, so it still fails the run with Ignore Errors ticked.
  • Failures keep the run going unless told otherwise. If later steps depend on a failed one, stop the run: use Stop and Error on that path, or set Continue Workflow on Error to No on an API step.
  • A Filter stop is not an error. Runs ended by a Filter never reach the Workflow Failed trigger.
  • Do not route on severity. The error_severity field currently reads critical for every failure, so route on first_error_type or first_error_code instead.
  • API steps have their own alerts. Send Email on Error and the step’s Error Webhook URL fire for that call alone, independent of the site-wide settings.

Related features

  • Task History: every run, step by step, with re-execute and run-from-step.
  • API by FlowMattic: per-step error handling for HTTP calls.
  • Branch: the yes/no check that usually sits in front of Stop and Error.

To see how runs are recorded and replayed, visit the Task History overview.

FAQ

How do I get notified when a FlowMattic workflow fails?

Turn on Enable Notifications in FlowMattic settings for a failure email, add an Error Webhook URL for a JSON alert, or build a workflow with the Workflow Failed trigger to send the alert anywhere. You can use all three together.

Does one failed step stop the whole workflow?

Not by default. Later steps still run and the run is marked Failed or Partial Failed. A Stop and Error step, an API step set to stop on error, or a PHP error inside a step ends the run at that point.

How do I re-run a failed workflow?

Open the run in Task History and choose Re-execute, with the original data or with fields you edit first. You can also re-run a single step, or run the workflow from a chosen step onward.

Will I still get alerts if my site cannot send email?

Yes, if you use the Error Webhook URL or a Workflow Failed workflow that posts to Slack, Discord or an API. Neither depends on the site’s email.

Workflow error handling is built into FlowMattic, alongside nearly 900 integrations and unlimited runs on your own server. Compare FlowMattic plans and put an alert on every workflow that matters.

More from the blog