Monday morning. You open Google Ads and notice something unusual — a specific ad group has spent $380 over the past six days with a 0.0% conversion rate. You check the product. It's been out of stock since Tuesday.
Six days of ads driving traffic to a page that literally could not convert. Six days of budget burned while Shopify sat there with a "Join the Waitlist" button where the Add to Cart used to be. You found out because you happened to look at performance data — not because anything alerted you.
This is the stockout problem. It doesn't announce itself. It bleeds quietly.
"I ran $380 in Google Ads to an out-of-stock product over 6 days. I want an alert and an auto-pause. I'd pay $30 today."
That's a real buyer quote from a Shopify operator running $1.8M in annual revenue. They're not asking for enterprise-grade inventory management. They want one workflow that catches the problem they've already experienced twice this quarter.
This article explains exactly what to build.
The Invisible Revenue Loss: Why You Don't Know How Much Stockouts Are Costing You
Here's the core problem: when a sale doesn't happen because a product is out of stock, that non-conversion doesn't appear in any report.
Your Shopify revenue dashboard shows what you earned. It does not show what you would have earned if the SKU had been in stock. Your Google Ads report shows a 0% conversion rate — it doesn't label this "inventory outage." Your GA4 data shows product page traffic with zero add-to-cart events — but it requires active investigation to determine whether the cause is a stockout, a pricing issue, or a page problem.
The stockout is invisible until you go looking for it.
An operator running $1.5M ARR ran a back-of-envelope calculation after installing a heat mapping tool. They noticed their top-traffic product page had zero add-to-cart events for five consecutive days. They checked inventory: out of stock since Monday. The estimate: 200 visits per day × 3% conversion rate × $55 AOV × 5 days = $1,650 in invisible lost revenue. No alert had fired. They found out by accident.
"I have no idea how much revenue I'm losing to stockouts. I suspect it's significant. I need a workflow that quantifies it so I can actually see the problem I've been ignoring."
Most DTC operators at $300K–$5M ARR have never audited this number. The workflow below fixes both problems simultaneously: it alerts you the moment a stockout occurs, and it logs exactly what each stockout costs you — so after 90 days you have the aggregate data to make better reorder decisions.
The Three Stockout Damage Events (And Why Each One Is Preventable)
A stockout isn't a single event. It generates three concurrent damage streams, each with a distinct dollar value:
1. Direct revenue loss. Traffic arrives at an out-of-stock page and cannot convert. Calculation method: (average daily sessions to product page) × (average conversion rate for that SKU) × (AOV) × (days OOS) = estimated lost revenue. For a $2M ARR store with 5,000 daily site visitors, a 6-day stockout on a top-10 SKU generates $4,000–$12,000 in estimated lost revenue depending on traffic distribution and seasonal velocity. This damage stream never appears in any report — it's purely invisible.
2. Ad spend waste. Google Ads continues bidding on keywords driving traffic to a non-converting page. Google's Smart Bidding algorithms will eventually reduce bids as the conversion rate collapses — but "eventually" means 2–4 days, not 2–4 hours. A $60/day campaign burns $120–$240 before Smart Bidding reacts at all. And Smart Bidding doesn't pause the ad group — it just reduces bids. During the initial OOS window, the period of highest traffic damage, Smart Bidding provides no meaningful protection.
3. Email campaign misfire. Klaviyo campaigns featuring OOS products drive high-intent clicks to non-converting pages, burning list engagement and generating unsubscribes. A 40,000-subscriber list at 8% open rate generates 3,200 clicks. If those 3,200 people land on an out-of-stock product page, you've spent your email engagement budget and delivered a negative brand experience simultaneously. Replies start arriving: "Why are you emailing me about something you don't have?"
Each of these damage events is independently preventable with automation. The workflow below addresses all three.
Why the Default Tools Don't Protect You
Four tools should solve this problem. None of them do.
Shopify native low inventory alerts fire once when inventory crosses your threshold and land in your email inbox. If you miss it, there is no escalation — no Slack notification, no ad group pause, no revenue loss estimate. Passive notification, not automated response.
Google Ads Smart Bidding reduces bids over days-to-weeks, not hours. A product going OOS Tuesday afternoon won't see meaningful bid reduction until Thursday at earliest — and Smart Bidding reduces bids, it doesn't pause the ad group. During the initial OOS window, when traffic damage is highest, Smart Bidding provides no protection.
Klaviyo conditional sending theoretically addresses the email misfire problem, but requires a developer to push real-time Shopify inventory into Klaviyo as a custom property and build conditional logic into every campaign template. For a 1–5 person ops team without a dedicated developer, that's a $500–$2,000 implementation for a problem a $29 workflow solves.
Triple Whale and Northbeam show post-hoc that a product had low conversion during a stockout window. They don't fire real-time OOS alerts, don't pause ad spend proactively, and cost $300–$800/month — above the target buyer's total ops tooling budget for this specific use case.
The Architecture: Shopify + Google Ads API + Slack, Automated
The complete workflow connects four components through n8n:
Component 1 — Shopify Admin API (hourly inventory scan)
n8n Schedule Trigger (every 1 hour) → HTTP Request node → GET /admin/api/2024-01/inventory_levels.json?location_ids=[your_location_id] → returns inventory_quantity per variant across all locations. A Function node compares each variant's current quantity to the cached state stored in a Google Sheet (columns: SKU, variant_id, current_quantity, oos_flag, oos_start_date, avg_daily_revenue). Transition detection: if inventory_quantity was >0 and is now 0 → set oos_flag = TRUE, log oos_start_date, route to OOS alert branch. If inventory_quantity was 0 and is now >0 → route to restock alert branch.
Component 2 — Google Ads API (ad group auto-pause and resume)
On new OOS detection: Google Ads API call using OAuth2 credentials → search for ad groups where ad copy or final URL contains the product name or SKU → mutate ad group status: PAUSED. On restock detection: reverse the action with status: ENABLED. This is the core automation most operators want — the ad group pauses the moment the product hits zero, not 72 hours later when Smart Bidding eventually catches up.
Component 3 — Slack alerts and inventory log
Three Slack node configurations: (a) immediate OOS alert with estimated daily revenue impact, (b) back-in-stock alert with stockout duration, estimated revenue loss, and ad spend saved confirmation, and (c) Monday 8am weekly digest with total stockout events, aggregate estimated revenue lost, and SKUs with repeat stockouts flagged for reorder point adjustment. All events logged to Google Sheet: SKU, stockout_start_date, stockout_end_date, duration_days, estimated_revenue_lost, ad_spend_saved.
Component 4 — Klaviyo pre-send inventory check
A separate n8n workflow triggered by a Klaviyo API webhook before any scheduled campaign send. It scans all product URLs featured in the campaign, checks current inventory for each, and if any featured product is OOS, fires a Slack alert: "⚠️ Scheduled email features OOS product — [Campaign Name] → [Product Name] is out of stock. Send anyway or hold?" Does not auto-cancel — requires human decision, but ensures the decision is made with full visibility before 40,000 emails go out.
"I sent a Klaviyo email featuring an OOS product to 40,000 subscribers. I need a system that checks inventory before every scheduled send."
That component addresses exactly that scenario.
Step-by-Step Setup: Zero to Automated Stockout Monitor in 2 Hours
Step 1 — Configure Shopify Admin API connection. In Shopify admin, create a custom app with read_inventory scope. Copy the API key and secret. In n8n, add an HTTP Request node with basic auth. Test: GET https://[your-store].myshopify.com/admin/api/2024-01/inventory_levels.json. Confirm inventory_quantity values return for all active variants across all locations.
Step 2 — Build the inventory state cache. Create a Google Sheet: SKU, variant_id, current_quantity, oos_flag, oos_start_date, avg_daily_revenue. Populate avg_daily_revenue from trailing 30-day Shopify sales data. This sheet is the stockout state memory between hourly n8n runs.
Step 3 — Build OOS detection logic. Add a Function node after the Shopify inventory pull. For each variant: compare current inventory_quantity to the cached value. Transition from >0 to 0 → set oos_flag = TRUE, log oos_start_date, route to OOS branch. Transition from 0 to >0 → route to restock branch.
Step 4 — Configure Google Ads API. Apply for a Google Ads Developer Token via your Manager Account (approval: 2–5 business days — apply before building the workflow). Configure OAuth2 Google Ads credentials in n8n with Developer Token and Customer ID. Build ad group search query matching ad group names and final URLs against product name and SKU strings. Pause action: AD_GROUP → status: PAUSED.
Step 5 — Configure Slack alerts and import workflow JSON. Three Slack nodes: (a) immediate OOS alert with daily revenue impact and ad group pause confirmation, (b) restock alert with duration, estimated revenue lost, ad spend saved, and "Google Ads resumed" confirmation, (c) Monday 8am digest reading the inventory log Google Sheet for weekly aggregates. Import the complete 14-node workflow JSON: Workflows → Import from File → connect credentials → test with one SKU.
What Your Monday Morning Slack Report Looks Like
Immediate OOS alert (triggered, Tuesday 2:07 PM):
🚨 STOCKOUT ALERT — Blue Ceramic Mug (SKU: MUG-BC-12OZ)
Inventory: 0 units (all locations)
Est. daily revenue impact: $247 (avg 15 units/day × $16.50)
Google Ads: Auto-pausing "Ceramic Mug" ad group — action taken.
Reorder reminder: 14-day lead time on file. Restock urgently.
Back-in-stock alert (triggered, Monday 10:14 AM):
✅ RESTOCKED — Blue Ceramic Mug (SKU: MUG-BC-12OZ)
Stockout duration: 6 days
Estimated revenue lost: $1,482 (6 days × $247/day est.)
Ad spend protected by auto-pause: $312 (6 days × $52/day avg)
Google Ads "Ceramic Mug" ad group: Resumed.
Monday weekly digest (scheduled, 8:00 AM):
📊 STOCKOUT IMPACT REPORT — Week of 2026-03-25
Total stockout events: 3 SKUs
Total estimated revenue lost: $3,840
Total ad spend protected: $870
⚠️ Repeat stockout: Blue Ceramic Mug (3rd event in 30 days)
→ Reorder point adjustment recommended.
The Google Sheet inventory log feeds a running revenue impact dashboard. After 90 days, most operators discover their aggregate stockout loss is 3–5x larger than their initial estimate — because the invisible loss had never been measured before the workflow was installed.
Scope Limits and What This Workflow Does Not Do
What it does: Hourly Shopify inventory monitoring across all variants and locations. Google Ads ad group auto-pause on OOS detection and auto-resume on restock. Klaviyo pre-send inventory check with Slack alert (human decision required). Stockout revenue loss estimation per SKU. Weekly impact reporting with aggregate totals and repeat stockout flags.
What it does not do:
It does not auto-reorder inventory. Supplier integration is out of scope — the alert and log create the visibility to make better reorder decisions; the actual purchase order remains manual or uses your existing reorder workflow.
It does not cover Meta/Facebook Ads in the current version. Google Ads API is the primary integration. Meta Ads API integration is a documented extension path in the setup guide.
It does not auto-cancel Klaviyo campaigns. The pre-send check fires an alert for human decision. Auto-cancellation creates operational risk — a product might be restocked in four hours, making auto-cancellation a false positive that kills a valid campaign.
For hybrid Shopify/Amazon operators, the apify/amazon-product-scraper Apify actor supplements the workflow by monitoring competitor stock levels and pricing on your top ASINs during your own stockout window. If a competitor is also OOS, your restocking urgency decreases. If they're in stock at a higher price, you expedite restock for a price capture opportunity. Input: competitor ASIN list. Output: in-stock status, current price, seller ranking — scheduled hourly alongside your Shopify scan via the same n8n workflow.
Google Ads API access note: Requires a Developer Token application through Google. Typical approval window: 2–5 business days. The full application walkthrough is included in the setup guide.
Get the Ecommerce Stockout Revenue Loss Monitor — $29
Your last stockout cost you $1,500–$5,000 in lost revenue and ad waste. This workflow monitors your Shopify inventory every hour, pauses Google Ads the moment a product hits zero, alerts your ops team before a Klaviyo campaign goes out featuring an OOS product, and sends a Monday morning report showing exactly what stockouts cost you last week.
What's included:
- n8n workflow JSON (import-ready: hourly Shopify scan → OOS detection → Google Ads auto-pause → Slack alerts → weekly digest)
- Shopify Admin API setup guide (authentication, multi-location inventory, variant-level tracking)
- Google Ads API setup guide (Developer Token application walkthrough + ad group pause/resume automation)
- Stockout revenue loss calculator (Google Sheet — avg daily revenue per SKU × days OOS)
- Slack alert templates (immediate OOS, back-in-stock, pre-email-send check, weekly digest)
- Klaviyo pre-send inventory check configuration guide
One prevented 6-day stockout at $250/day estimated daily revenue = $1,500 in protected revenue. ROI on $29: 5,000%+.
[Buy the Ecommerce Stockout Revenue Loss Monitor — $29 → [GUMROAD_URL]]
Or get the Ecommerce Ops Intelligence Pack — Stockout Revenue Loss Monitor (#247) + MAP Violation Detection System (#239) — $39. Protect revenue from both ends: stop losing sales to stockouts AND stop losing margin to unauthorized price undercutting. Complete ecommerce ops defense stack.
[Get the Ecommerce Ops Intelligence Pack — $39 → [GUMROAD_URL]]
Article 66 | Pain #247 — Ecommerce Stockout Revenue Loss Monitor | Domain: Ecommerce / Inventory Operations | Severity: 7.5/10 | AR Cycle 42 (C125/v83) | 2026-04-01
Top comments (0)