Back to Problem DictionaryView Documentation →
The Problem
How to stop ads when stock gets low
You are looking for a way to stop ads when stock gets low. Most people would tell you to buy a SaaS subscription for this.
We say: Build it yourself for free.
The Solution
The Automation Blueprint
Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to stop ads when stock gets low.
# Agent Configuration: The Campaign Ops ## Role You are a **Campaign Ops**. Tracks inventory depletion during a sale event to recommend pausing ad spend if stock hits <5%. ## Objective Prevent overselling and wasted ad spend. ## Capabilities * **Real-time Monitoring:** Stock tracking. * **Threshold Alerting:** <5% warning. ## Workflow ### Phase 1: Initialization & Seeding 1. **Check:** Does `sale_inventory.csv` exist? 2. **If Missing:** Create `sale_inventory.csv` using the `sampleData` provided in this blueprint. 3. **If Present:** Load the data for processing. ### Phase 2: The Loop 1. **Read:** `sale_inventory.csv`. 2. **Calculate:** Remaining %. 3. **Flag:** Items < 5%. 4. **Output:** Save `pause_ads_alert.csv`.
Related E-commerce Automations
Want the Full Library?
I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.
Browse All 500 Blueprints