# Tag low-stock products

Runs daily and adds a 'low-stock' tag to any product with inventory below a threshold. Removes the tag when the product is restocked.

Canonical URL: https://templates.jsworkflows.com/templates/tag-low-stock-products/

## When to use this template

This template is built for Shopify stores using the JsWorkflows app.

Use this template when you want a ready-made workflow for this use case: Runs daily and adds a 'low-stock' tag to any product with inventory below a threshold. Removes the tag when the product is restocked.

It is designed for Shopify inventory and merchandising operations and gives you a production-ready starting point instead of building the automation from scratch.

This workflow uses the scheduled trigger model and starts from the "Daily schedule" trigger. It includes setup fields for merchant-facing values, so you can configure the workflow before installing it.

## Metadata

- Category: Inventory and merch
- Trigger: Daily schedule
- Workflow type: Scheduled
- Complexity: medium
- Usage class: starter-friendly

## Connected services

- None

## Additional Shopify scopes

- read_products
- write_products

## Setup fields

- Low-stock threshold (`LOW_STOCK_THRESHOLD`)
  - Type: number
  - Storage: config
  - Required: yes
  - Description: Any product with at least one tracked variant below this quantity is tagged as low stock.
- Low-stock tag (`LOW_STOCK_TAG`)
  - Type: text
  - Storage: config
  - Required: yes
  - Description: Exact Shopify product tag to add when stock is low and remove when stock recovers.

## Setup guide

## Before you start

This template runs on a schedule and keeps a product tag in sync with Shopify inventory levels.

## How it works

- The workflow scans products page by page
- If any tracked variant on a product has inventory below the configured threshold, the product gets the low-stock tag
- If a tagged product is fully restocked, the tag is removed
- Large catalogs and products with many variants are paginated safely

## Configure in setup

- `Low-stock threshold`: inventory quantity below which a product is considered low stock
- `Low-stock tag`: exact Shopify product tag to add and remove

## Notes

- This uses Shopify tracked inventory quantities on variants
- It works well for merchandising, collection rules, and operational reporting based on product tags
- Set your preferred schedule start time and timezone when saving

