Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 36 ยท Governance and Patterns

Error Handling, Alerts and Replays

Find and fix failed automation runs: read Zap history, set up error notifications, use auto-replay, build an error-reporting Zap, and design steps that fail safely.

Every automation fails sometimes. An API is down for ten minutes, a customer enters a bad email, a token expires, a field you rely on disappears. What separates a hobby automation from a dependable one is not that it never fails, but that you find out quickly, know exactly what happened, and can safely run it again. This lesson covers the tools Zapier provides, the general techniques that apply to Make and n8n as well, and how to design steps that fail in a harmless way.

The Zapier interface cannot run here, so menus are described in words (names and locations change over time; verify in your account) and the code is JavaScript stand-ins that practise the logic.

Reading Zap history

Zapier records each Zap run in Zap history (in the sidebar). For every run you see a status, the time, and the data that went into and out of each step. Typical statuses:

  • Success: all steps finished.
  • Filtered or Stopped: a Filter or a Paths condition ended the run on purpose. This is normal and usually not billed as a task.
  • Error (sometimes shown as "Halted"): a step failed; later steps did not run.
  • Held or Delayed: waiting for a Delay or a rate-limit.
  • Playing / Replayed: a re-run of an earlier failure.

When a run errors, open it and read the failed step first. The message normally names a cause: 401 Unauthorized (bad credentials), 422 or 400 (data rejected), Required field missing (an earlier step returned nothing), a timeout. The previous step's output tells you why a field was empty, which is the most common root cause.

Notifications about errors

By default, Zapier emails the account owner when a Zap errors, and may group many errors into a summary. In your profile or Zap settings you can adjust notification emails for errors, and in a team you can route them to a shared address. Do not rely on one person's inbox: use a dedicated alias or a chat channel. A good habit is to make sure that someone who can fix it receives every error message and knows they own it.

For critical Zaps build your own alerting. Zapier's Zapier Manager app has an Zap Error trigger that fires when any of your Zaps errors; a Zap on top of it can post to Slack, create a ticket or add a record to an "Incidents" table with the Zap name, step and message. This is the same idea as n8n's Error Trigger workflow and Make's error routes.

flowchart LR
    Z1["Any Zap"] -- "error" --> M["Zapier Manager: Zap Error"]
    M --> T["Add record to Incidents table"]
    T --> S["Notify the owner in chat"]

One central error-reporting Zap covers every other Zap.

Replays and auto-replay

A failed run can often be replayed from Zap history: Zapier re-runs the failed step and the following steps with the original trigger data. Use it after you have fixed the cause (renewed a connection, corrected data in the target app). Two things to remember:

  • A replay uses the same data, so a bad input will fail again. Fix the data in the destination or change the Zap, then replay.
  • Steps that already succeeded earlier in the run are not repeated by a replay of the failed step, but verify that: a duplicated email or invoice is a more expensive problem than a failure.

Auto-replay is a Zap setting (on many plans) that retries a failed run automatically after waiting, for example several times over some hours, which handles brief outages without anyone doing anything. Replays may count as tasks when they succeed, so check your plan's rules. In Make the equivalent is the Break directive with automatic retries; in n8n you set Retry On Fail on a node and use the Error Trigger for the rest.

The next stand-in models retries with a cap so you can see how the numbers behave.

JS Stand-in: retry with a limit

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The second service never recovers, so after the last attempt the run must go to a human: an incident record, a message, a ticket.

Designing steps that fail safely

Think about each step as "what if this fails halfway?"

  1. Put the risky, reversible step first and the irreversible one last. Create the draft invoice before sending the email that announces it.
  2. Validate early. A Filter right after the trigger that checks required fields (email not empty, amount greater than 0) stops bad data before any side effect.
  3. Make steps idempotent. Use Find or Create and processed-ids (Tables as Lookup, State and Dedupe) so a replay cannot double-create.
  4. Provide defaults and fallbacks: a lookup default, an alternative route in Paths.
  5. Avoid silent failures. A Filter that stops a run ends it as "Filtered", not "Error": nobody is alerted. If a filtered-out run is really a problem (an order without an email), send it to a Path that logs it.
  6. Do not catch everything. A fallback that hides all errors hides real bugs.
JS Stand-in: validate first, then act, log the rest

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A troubleshooting routine

When something breaks, work through this list in order. It saves time almost every time:

  1. Open the failed run and read the exact error message.
  2. Check the step before the failed one: was its output what you expected?
  3. Compare with the last successful run: what differs in the input?
  4. Test the step again with fresh data (Test step) and look at the response.
  5. Check connections (expired login, changed permissions) and plan limits.
  6. Fix the cause, then replay, and confirm the result in the destination app.
  7. Write down what happened (see Naming, Documentation and Change Management).

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A run ends with the status Filtered. What does that usually mean?

    Filtered runs are intentional stops and do not send error alerts, so do not use a Filter to hide real problems.
  2. 2. You replay a failed run without fixing a bad email address in the data. What happens?

    A replay reuses the original trigger data, so fix the cause first.
  3. 3. Which ordering of steps is safest?

    If something fails, you want fewer side effects to undo.
  4. 4. What can a central error-reporting Zap use as its trigger?

    The Zapier Manager app can trigger when any of your Zaps errors.

Summary

  • Read Zap history from the failed step backwards; the previous step's output usually explains it.
  • Route alerts to a team address or channel; build a central error Zap with Zapier Manager (n8n: Error Trigger, Make: error handlers).
  • Replay only after fixing the cause; auto-replay and retries handle short outages.
  • Validate early, order steps safely, make them idempotent, and never let failures stay silent.

Next: Task Usage and Cost Control