Every Sunday, thousands of drugstore couponers spend 3–5 hours manually reading the weekly CVS flyer, matching digital manufacturer coupons against ExtraBucks promotions, and figuring out which transaction to ring up first so the ExtraBucks from Transaction 1 pay for Transaction 2.
I wanted to see if a boring, explainable, zero-dependency Node.js agent could automate the entire loop — and ship a live public Black Friday deal hub in time for Black Friday 2026.
Live demo (Nov 22–28, 2026 Black Friday ad): 👉 cvs-black-friday-deals.vercel.app
Live Telegram bot & Saturday Double-Dip alerts: @cvs_agent_hydroklent_bot | Public Deals Channel
Architecture (Zero-Dep Node.js + Static Web Hub)
Instead of over-engineering an ILP solver or heavy SaaS dashboard, I split the pipeline into five tiny ESM modules:
-
scrape/— Pulls the live weekly CVS circular JSON (231 deals for Nov 22–28, 2026). -
clip/— Human-paced ExtraCare clipper exporting clipped digital coupons to JSON. -
engine/— Greedy, explainable matchup optimizer that enforces real CVS checkout rules, groupsspend $X get $Y ExtraBucksthresholds, and chains transactions so earned ExtraBucks roll into the next stop. -
dd/— Watches the Saturday 9:00 PM–Midnight PT "double-dip" overlap window (when next week's coupons drop at midnight ET while this week's ad is still live on the West Coast). -
notify/+web/— Zero-dep Telegram long-polling bot (fetchonly) + static interactive checklist & cashback calculator deployed to Vercel.
3 Hilarious Real-World Bugs We Caught Before Going Live
When you run a naive matcher against real drugstore ad text, you immediately discover how chaotic retail copy is:
Bug 1: Stacking 12 Coupons onto 2 Bottles of Laundry Detergent
CVS's /extracare/home renders the same digital coupon across multiple tabs (All / On Card / For You), creating duplicate IDs in the export. Worse, our first scorer summed every matching coupon on an item — producing a comical "$0.00 OOP" transaction that stacked 12 Gain/Downy coupons onto 2 items.
Real CVS checkout rules allow at most 1 digital manufacturer coupon per item unit, multi-buy coupons ("TWO Olay Body Wash...") require qty >= 2, and each digital coupon is single-use across the entire trip.
export function selectItemCoupons(matchedCoupons = [], qty = 1, dealPriceCents = 0, usedCouponIds = new Set()) {
const candidates = dedupeCoupons(matchedCoupons)
.filter((c) => !usedCouponIds.has(c.id || c.title))
.map((c) => ({ c, minQty: couponMinQty(c), v: c.type === 'free_item' ? dealPriceCents : (c.valueCents || 0) }))
.filter((x) => x.v > 0 && x.minQty <= qty)
.sort((a, b) => (b.v / b.minQty) - (a.v / a.minQty) || b.v - a.v);
let remaining = qty, savings = 0;
const selected = [];
for (const x of candidates) {
if (x.minQty <= remaining) {
selected.push(x.c);
savings += x.v;
remaining -= x.minQty;
if (remaining <= 0) break;
}
}
return { selected, savingsCents: Math.min(savings, dealPriceCents * qty) };
}
Bug 2: Sudafed Matching Colgate & Puffs Tissue Matching Reese's Puffs Cereal
Naive token overlap matched:
-
"on any ONE (1) Adult or Children's SUDAFED"→ Colgate hello adult toothpaste -
"ONE Puffs Facial Tissue"→ Reese's Puffs cereal -
"TWO Olay Facial Moisturizer"→ Olay *body wash*
Adding a generic modifier stop-list (adult, children, air, pack, liquid) before extracting the lead brand token + explicit product-type guardrails eliminated every single false positive.
Bug 3: Akamai Rate Limiting
Clipping more than ~10–15 coupons rapidly triggers a hard 403 wall + forced logout. The fix wasn't trying to outsmart Akamai — it was enforcing a strict human-pace 10 clips/run budget once per day.
Live Black Friday 2026 Output (Nov 22–28)
After fixing the matching engine, the live Nov 22–28 plan outputs 28 sequential transactions earning $141.00 in ExtraBucks, including real checkout-accurate wins like:
- 2× Colgate Optic White ($6 ea) − $5 digital coupon − $7 EB rolled = $0.00 OOP → earns +$6.00 EB
- Tide + Gain + Downy Spend $20 → stack up to $13 digital coupons → earns +$8.00 EB
- 2× Colgate Total 5.1 oz ($4.99 ea) − $2 digital coupon − $5 EB rolled = $2.98 OOP → earns +$5.00 EB
Try the interactive phone checklist & Black Friday Cashback Calculator live here:
👉 https://cvs-black-friday-deals.vercel.app
Bonus: Stacking $90 in Black Friday Cashback on Top (Works for Dev Gear & Holiday Gifts Too)
If you're buying Black Friday tech, gifts, or CVS.com pickup orders this weekend, you can stack two free welcome bonuses on top of store sales and credit card rewards:
- Rakuten — $50 Welcome Bonus (spend $50+ at Best Buy, Target, Dell, Nike, Sephora, Ulta, or CVS.com within 90 days): Claim $50 Bonus
- TopCashback — $40 Promo (Ends Nov 30, 11:59pm PST): Claim $40 Bonus
- Full 15-store comparison table: cvs-black-friday-deals.vercel.app/cashback.html
(Full disclosure: those are referral links — you unlock the welcome bonus and it helps fund the server & bot!)
If you run a couponing group, Telegram channel, or deal blog and want a white-labeled version of this engine branded under your name (?brand=YourName live preview works right on the URL!), drop a comment or check out the Telegram bot.
Top comments (1)
If the flyer or coupon changes after a plan is generated, do you keep the original offer alongside it so shoppers can compare the plan with what was advertised?