WooCommerce Stock Monitor

👤 zero2ai-hub 📦 v1.0.1 ⭐ 4.1 ⬇️ 1K 下载
📈 商业运营 免费 🔑 需 API Key

📖 技能介绍


name: skill-woocommerce-stock-monitor version: 1.0.0 description: Monitor WooCommerce products for out-of-stock changes and send Telegram alerts. Run daily via cron. metadata: openclaw: requires: { bins: ["node"] }


skill-woocommerce-stock-monitor v1.0.0

Monitor WooCommerce products for out-of-stock changes and send Telegram alerts. Tracks instock → outofstock transitions and alerts your team daily.

Usage

node scripts/stock-monitor.js

Configuration

Set via environment variables:

Variable Default Description
WOO_API_PATH ~/woo-api.json Path to WooCommerce API credentials JSON
TELEGRAM_BOT_TOKEN Telegram bot token for alerts
TELEGRAM_CHAT_ID Telegram chat/group ID to send alerts to

woo-api.json format

小葱技能站7w4.net,专业的AI技能分享平台。

{
  "url": "https://your-store.com",
  "consumer_key": "ck_...",
  "consumer_secret": "cs_..."
}

Cron setup

# Run daily at 07:00 UTC
0 7 * * * TELEGRAM_BOT_TOKEN=xxx TELEGRAM_CHAT_ID=yyy node /path/to/scripts/stock-monitor.js

Behavior

  • First run: Sends a baseline report of all currently OOS products
  • Subsequent runs: Only alerts on new instock → outofstock transitions
  • State file: Saved to memory/stock-state.json (tracks previous run)

Alerts

  • 📦 Stock Monitor — Baseline Report — first run summary
  • ⚠️ Stock Alert — Out of Stock — when products go OOS

🤖 AI 评测

这是一款实用的库存监控工具,核心功能完整,能有效追踪商品缺货情况并推送告警。文档清晰、配置简单,对新手友好。美中不足是功能相对单一,缺乏自动化测试保障稳定性,适合对稳定性要求不高的个人或小团队使用。

📊 多维度评分

适应性4.3
规范性4
有效性4.1
可靠性4.2
可信度4.3

📁 包含文件 (4 个)

📄 README.md 752 B
📄 SKILL.md 1.4 KB
📄 _meta.json 150 B
📄 scripts/stock-monitor.js 4.9 KB