A free n8n workflow for Shopify low‑stock alerts (and 4 gotchas)
说明与用途
新的 n8n 自动化流程为 Shopify 发送低库存 Slack 通知,每 4 小时检查所有变体,避免重复消息。
问题
Small Shopify stores need early low‑stock alerts, but Shopify only notifies after a sale attempt.
结果
The workflow runs every 4 hours, fetches all variants, filters low‑stock items, and sends a single Slack message only when new low‑stock items appear, avoiding duplicate alerts and gift‑card warnings.
工作流
- Every 4 hours trigger starts the workflow
- Manual trigger allows on‑demand execution
- Config node sets shop URL, API version, threshold, and Slack webhook
- Get access token node exchanges client ID and secret for a 24‑hour Admin API token
- Fetch all variants node calls productVariants in GraphQL and pages until hasNextPage is false
- Find changes node filters active, tracked variants at or below threshold and compares with last run
- Send to Slack node posts one message only when changes are detected
证据
I ran it on n8n 2.44.5 against a mock of the Shopify Admin GraphQL API
Every 4 hours (or when you click Execute workflow) it starts.
Get access token swaps your app's client ID and secret for a 24‑hour Admin API token.
Fetch all variants calls productVariants in GraphQL and keeps paging until hasNextPage is false.
- 记录日期: 2026-10-26T16:11:11.811Z