Case Study: Reliability Engineering for Paid Ads

Self-Healing Lead Pipeline
Paid Leads That Can’t Silently Vanish

You pay for every Facebook lead the moment someone submits the form. If the pipeline that carries them into your CRM stops — even for a few hours — you keep paying and keep losing leads, and nobody finds out until a salesperson asks where they went.

The Problem: An Inherited 27-Hour Silent Outage

When we took over a client's lead pipeline, it had just suffered a 27-hour silent outage. Ad spend kept running, leads kept submitting — and every one of them fell on the floor before reaching the CRM. Because nothing errored loudly, there had been no alert: the failure was found only after the fact, with budget already burned.

The Fix: A Pipeline That Watches Itself

We hardened all four stages with de-duplication, a 7-day retry window, and retry-on-fail so transient errors self-recover. Then we added a dead-man’s-switch watchdog — a separate workflow that expects a heartbeat every cycle and raises an alarm the instant leads stop arriving. Silence is now an event, not a blind spot.

Production — running every 17 minutes since hardening
27h
Outage that triggered the rebuild
100%
Lost leads recovered & back-filled
17 min
Pipeline run cadence
1 cycle
Time to detect silence

How It Works Under the Hood

Every step engineered for correctness, not just automation

De-Duplication

Every lead is keyed and checked before insert, so retries and overlapping windows can never create duplicate CRM records.

7-Day Retry Window

The pipeline re-checks the source over a rolling 7-day window, so a lead missed during an outage is still picked up after recovery.

Retry-on-Fail

Transient network and API errors retry with back-off instead of crashing the run — most blips self-heal with no human involved.

Dead-Man Watchdog

A separate scheduled workflow expects a heartbeat each cycle. Miss one and it alarms immediately — the 27-hour blind spot cannot recur.

The Automated Pipeline

From trigger to result — fully automated, end to end

1

Fetch Leads

Poll the ad platform on a 17-minute schedule

2

De-Dup

Key each lead; skip anything already stored

3

Write to CRM

Insert new leads with retry-on-fail

4

Heartbeat

Emit a signal the watchdog is listening for

5

Watchdog

No heartbeat → instant alarm to the team

Built On a Production-Grade Stack

Industry-leading AI and automation platforms

n8n Automation

Four-stage pipeline + watchdog

Meta Lead Ads

Paid lead source

Supabase / Postgres

De-duplication ledger

SmartSuite CRM

Lead destination + alerting

Results: Before and After

What changed once the automation went live

Before

  • A 27-hour crash dropped every incoming lead
  • Ad budget spent with nothing reaching the CRM
  • No alert — the outage was invisible until noticed by hand
  • Duplicate risk whenever anyone re-ran the flow manually

After

  • Every lost lead recovered and back-filled after the outage
  • Silence caught within one cycle by the watchdog
  • Transient errors self-heal via retry-on-fail
  • Hundreds of clean cycles since hardening, no duplicates
100%
Leads recovered
17 min
Run cadence
0
Duplicates created
24/7
Self-monitoring
The watchdog runs as an independent workflow — if the main pipeline dies entirely, the alarm still fires.

Make Your Lead Pipeline Impossible to Lose

If you spend on paid leads, a silent pipeline outage is money on fire. De-duplication, retry windows and a dead-man watchdog turn a fragile flow into one that recovers itself and shouts when it can’t.

Harden Your Lead Pipeline

Meta / Google lead ads • any CRM • self-monitoring watchdog

Free 30-minute consultation • Works with your existing lead source • Alerting included • Audit fee credited toward your build.