Tags products created within the last N days (default 30) with 'new-arrival' and removes the tag once they age out of the window.
async def run(ctx): window_days = ctx.params.get("window_days", 30) cutoff = ctx.now() - timedelta(days=window_days) for product in await ctx.shopify.query(ALL_PRODUCTS):
How do you keep a new-arrivals collection current on Shopify?
To keep a new-arrivals collection current on Shopify, this template tags every product created within your window, 30 days by default, and removes the tag the day a product ages out. Point a smart collection at the tag once and the storefront section stays fresh on its own: no launch-day tagging session, no stale "new" badges three months later, and a window you can widen to 60 or 90 days for slower catalogs without touching anything else.
The failure mode of manual tagging is not the adding, it is the removing: nobody circles back to untag last season's arrivals, so "New In" quietly becomes an archive. Collaudo re-checks the window on a schedule, and each run lists exactly which products enter and which leave. Approve the list and the collection turns over by itself, every day it runs.
Last updated August 24, 2026
If you run a sharper version of this template, or something it inspired, send it in. We review every application and publish the good ones, credited to you or your agency.
AI writes real Python or TypeScript, a dry run rehearses it, you approve, it deploys.
Free plan · no card · 🇪🇺 EU data residency