Skip to content

Failure Notifications

When a run fails for good, FlowMint sends one alert, so a lost submission does not go unnoticed. Every site gets it without setup: by default it goes by email to the site’s administration address.

  1. Slack, when a slack_webhook credential is stored and starts with https://. The message is posted to the webhook’s channel.
  2. Otherwise email, to the notification_email credential if it holds a valid address, or else to the address under Settings → General → Administration Email Address.

Only one channel is used. With a Slack webhook stored, no email is sent.

The alert is sent when a run is marked Failed: at once for a step with the default on_error: fail, and for a step with on_error: retry only after its last retry fails. A step with on_error: continue that fails does not send one, nor does a log_error step.

The alert is plain text:

  • the workflow’s title (its id up to version 0.9.0) and the site name;
  • the error code and message;
  • the form entry number, or “Trigger: scheduled run (no form entry)”;
  • a link to the run in Run History, where you can inspect and replay it.

The email’s subject is [FlowMint] Workflow failed: <workflow id> — <site name> — the id, so mail filters keep matching.

  • Email to a team address: store the address as notification_email.
  • Slack: in Slack, create an app with an Incoming Webhook for the channel, then store the webhook address as slack_webhook.

Both are stored as in Managing credentials. Neither can be tested through FlowMint; the test route answers not_testable. To check, make a test workflow fail on purpose, for example with a send_email_template step naming a template that does not exist: template_not_found is never retried, so the alert goes out at once.

  • No Slack message and no email. The Slack post is sent without waiting for an answer, so a wrong or revoked webhook fails silently and no email is sent either. Remove the slack_webhook credential to fall back to email.
  • The email never arrives. It goes through WordPress mail like any other site email; check the site’s mail delivery.

The fmw_failure_notification_enabled filter (arguments: enabled, run id, workflow id) can turn alerts off per workflow, and fmw_failure_notification_message (message, run id, workflow id, entry id, error code, error message) can rewrite the text. For other channels, hook the fmw_workflow_run_failed action.

Available since FlowMint Workflows 0.6.5.