Skip to content
Tutorials Center
My learning

Topics

Lesson 36 of 36 ยท Projects and Practice

Practice: Debugging Broken Automations

Practice finding bugs in automations: eight broken scenarios with symptoms and causes (empty fields, duplicates, loops, wrong order, time zones), a debugging method and a runnable quiz.

Building automations is half the skill. The other half is finding out why one stopped working or behaves oddly. Most bugs fall into a small number of families, and once you recognise them, debugging becomes a short checklist rather than guesswork. This closing lesson gives you a method, eight broken scenarios to diagnose, and a self-checking exercise.

The scenarios describe Zapier-style automations, but every one applies to Make and n8n as well. Because the products cannot run on this site, the cases are text, and the code blocks are JavaScript stand-ins that reproduce each bug so you can see it happen. Try to diagnose each case before reading the answer.

A debugging method

  1. Reproduce. Find a run that failed or misbehaved and keep its input data.
  2. Locate. Which step first shows wrong output? Check the run history from the top; the bug is often earlier than the step that errors.
  3. Compare. Put a good run next to the bad one. What differs?
  4. Form one hypothesis, test it by changing one thing, and retest with real data.
  5. Fix the cause, not the symptom (a filter to hide an error is not a fix).
  6. Prevent a repeat: add validation, an alert or a note in the documentation (Naming, Documentation and Change Management).

Case 1: the empty email

Symptom: "Send welcome email" fails with "Missing recipient" for some customers. In the run history the trigger shows an email address, but the action step's To field is empty.

Think before you open the answer: where does the action's To value come from?

Diagnosis: the field was mapped from a step whose output was empty for those runs, or from a field name that exists only in some payloads (an optional contact__email). The stand-in shows how a missing nested key becomes empty and how a defensive default or filter prevents the error.

JS Case 1 stand-in: a missing nested field

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

No output.

Fix: add a Filter or Path "email exists" at the top, log the rest, and ask the sender to always include the field.

Case 2: the duplicate invoices

Symptom: some customers get two invoices a few seconds apart. The Zap triggers on "New Payment" from a webhook.

Diagnosis: the sender retried because it did not get a quick enough 200, so the same event was delivered twice and nothing in the Zap recognised it. Compare with Webhooks by Zapier: Catch Hook: the acknowledgement is sent on receipt, but network hiccups still cause retries.

Fix: record the event id in a processed table and continue only on first sight (Tables as Lookup, State and Dedupe); also use an idempotency key in the invoicing API.

Case 3: the endless loop

Symptom: the task counter explodes overnight. A Zap triggers on "Updated Record" in a table and its last action updates the same record (setting last_processed).

Diagnosis: the Zap's own edit triggers it again. Run history shows the same record over and over.

JS Case 3 stand-in: a self-triggering update

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

No output.

Fix: trigger on a specific field or view, and add a filter that ignores changes made by the automation itself (a flag field), as in the table lessons.

Case 4: wrong week in the report

Symptom: the weekly total is a few percent too low, and the missing sales were made on Sunday evening.

Diagnosis: a time zone mismatch. Events are stored in UTC, the report window uses the team's local time (or the reverse), so late Sunday events fall into the other week. See the window logic in Project: Weekly Report with Digest and Summary.

JS Case 4 stand-in: the same event in two time zones

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

No output.

The event is on Monday in UTC but Sunday in New York, so it lands in different reports depending on the window's time zone. Fix: convert once, early, to one agreed zone and document it.

Case 5: text instead of numbers

Symptom: an order total shows 4015 instead of 55. The Zap adds 40 and 15.

Diagnosis: both were text (from a form or a spreadsheet cell), so the addition joined them. The fix is converting with the Formatter Numbers action or Number() before calculating.

JS Case 5 stand-in: text plus text

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

No output.

Case 6: the filter that eats everything

Symptom: a Zap shows "Filtered" for every run, nobody is alerted, and leads stop arriving.

Diagnosis: the filter says Plan (Text) Exactly matches Pro, but the data now sends pro (lower case) or Pro with a trailing space. "Exactly matches" is case sensitive in many tools. Filtered runs raise no errors, which is why this one goes unnoticed. Fix: normalise text first (trim, lower-case) or use "contains" or case-insensitive options, and add an alert when the filtered share jumps (compare run counts in the monthly review).

Case 7: steps in the wrong order

Symptom: customers receive the "your order shipped" message, but the shipping record in the table does not exist yet, and a lookup in a later step fails.

Diagnosis: the notification was placed before the step that creates the record, so on a failure the customer was told something that is not true. Fix: put irreversible and customer-facing actions last (Error Handling, Alerts and Replays).

Case 8: the quiet 429

Symptom: a Zap that loops over 300 contacts works for the first 60 and then fails randomly.

Diagnosis: the API's rate limit answers 429 Too Many Requests after a burst (API Authentication, Pagination and Rate Limits). Fix: add a Delay or batch calls, and retry with backoff.

Self-check: diagnose from symptoms

The tool below maps typical symptoms to the likely cause families, like a flashcard. Edit the list, add your own cases from real life, and quiz yourself.

JS Stand-in: symptom to cause lookup

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

No output.

Keep a bug diary

Every time you fix a real problem, add one line to a shared page: symptom, cause, fix, date. After a few months you will have a casebook for your own systems that is more valuable than any general guide. You have now met the whole toolbox of this course: triggers and actions, filters and formatting, webhooks and APIs, tables, alternatives, governance and projects. Return to the track overview any time to revisit a chapter.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A Zap shows Filtered on every run after a data change. What is the likely class of problem?

    Filtered runs are intentional stops, so a changed value can silently block everything.
  2. 2. Which step in the debugging method comes right after reproducing the problem?

    Find where the data first goes wrong; the failing step is often not the root cause.
  3. 3. Why do two copies of an invoice appear a few seconds apart after a webhook?

    Retries deliver the same event twice; an id check makes the Zap idempotent.
  4. 4. What is the best response after fixing a bug?

    Prevention and documentation stop the same bug from returning.

Summary

  • Debug by reproducing, locating the first wrong output, comparing good and bad runs, testing one hypothesis at a time and fixing causes.
  • Common families: missing fields, duplicates from retries, update loops, time zones, text-as-number, over-strict filters, wrong step order, rate limits.
  • Prevent repeats with validation, idempotency, alerts and a written bug diary.

Next: Zapier and No-code Automation overview