Workflow

Product Trend Decay Alert Pipeline

Detect when product search trends weaken before sales drop. Automated alerts for declining product interest across Google, Amazon, Reddit.

Overview

Product managers and e-commerce teams learn about declining interest too late -- after sales have already dropped. This workflow monitors search volume proxies across Google, Amazon, and Reddit daily for your products and competitors. When the number of organic results, result freshness, or Reddit discussion volume declines week-over-week, it fires an alert before the sales decline shows up in your dashboard.

Trigger

Cron schedule (daily at 6 AM UTC)

Schedule

Daily at 6 AM UTC

Workflow Steps

1

Load product watchlist

Read your products and competitor products with their search queries for each platform.

2

Query current signals

Search Google, Amazon, and Reddit for each product. Record result count, average result age, and discussion volume.

3

Load historical baseline

Retrieve the 7-day rolling average from storage for each product and signal.

4

Calculate decay score

Compare today's signals against the 7-day average. Flag products with >15% decline in any signal.

5

Generate decay report

Format flagged products with specific declining signals and percentage change.

6

Alert and update history

Send the report to Slack or email. Update the rolling average with today's data.

Python Implementation

Python
import requests, os, json
from pathlib import Path
from datetime import date

H = {"x-api-key": os.environ["SCAVIO_API_KEY"]}

PRODUCTS = [
    {"name": "wireless earbuds", "platforms": ["google", "amazon", "reddit"]},
    {"name": "standing desk converter", "platforms": ["google", "amazon"]}
]

def measure_signals(product_name, platform):
    r = requests.post("https://api.scavio.dev/api/v1/search", headers=H,
        json={"platform": platform, "query": product_name}, timeout=10).json()
    organic = r.get("organic", [])
    return {
        "result_count": len(organic),
        "has_recent": any("2026" in o.get("snippet", "") for o in organic[:5]),
        "top_titles": [o.get("title", "")[:60] for o in organic[:3]]
    }

def run_decay_check():
    today_data = {}
    for product in PRODUCTS:
        signals = {}
        for platform in product["platforms"]:
            signals[platform] = measure_signals(product["name"], platform)
        today_data[product["name"]] = signals

    history_path = Path("trend_history.json")
    if history_path.exists():
        history = json.loads(history_path.read_text())
        for name, signals in today_data.items():
            prev = history.get(name, {})
            for platform, data in signals.items():
                prev_count = prev.get(platform, {}).get("result_count", data["result_count"])
                if prev_count > 0:
                    change = (data["result_count"] - prev_count) / prev_count
                    if change < -0.15:
                        print(f"DECAY ALERT: {name} on {platform} - results dropped {change:.0%}")

    history_path.write_text(json.dumps(today_data, indent=2))

run_decay_check()

JavaScript Implementation

JavaScript
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};

async function measureSignals(productName, platform) {
  const r = await fetch("https://api.scavio.dev/api/v1/search", {
    method: "POST", headers: H,
    body: JSON.stringify({platform, query: productName})
  }).then(r => r.json());
  const organic = r.organic || [];
  return {
    resultCount: organic.length,
    hasRecent: organic.slice(0, 5).some(o => (o.snippet || "").includes("2026")),
    topTitles: organic.slice(0, 3).map(o => (o.title || "").slice(0, 60))
  };
}

Platforms Used

Google

Web search with knowledge graph, PAA, and AI overviews

Amazon

Product search with prices, ratings, and reviews

Reddit

Community, posts & threaded comments from any subreddit

Frequently Asked Questions

Product managers and e-commerce teams learn about declining interest too late -- after sales have already dropped. This workflow monitors search volume proxies across Google, Amazon, and Reddit daily for your products and competitors. When the number of organic results, result freshness, or Reddit discussion volume declines week-over-week, it fires an alert before the sales decline shows up in your dashboard.

This workflow uses a cron schedule (daily at 6 am utc). Daily at 6 AM UTC.

This workflow uses the following Scavio platforms: google, amazon, reddit. Each platform is called via the same unified API endpoint.

Yes. Scavio's free tier includes 500 credits per month with no credit card required. That is enough to test and validate this workflow before scaling it.

Product Trend Decay Alert Pipeline

Detect when product search trends weaken before sales drop. Automated alerts for declining product interest across Google, Amazon, Reddit.