HomeShopify & E-commerceShopify new arrivals collection automation with…

Shopify new arrivals collection automation with n8n

Shopify new arrivals collection automation with n8n









Shopify new arrivals collection automation keeps your storefront looking fresh without a single manual edit: every product you create is added to a New Arrivals collection the moment it goes live, and any item older than 30 days drops out on its own. This guide builds that two-part workflow in n8n using only the Shopify Admin API, walks through every node, lists the real costs, and links a ready-to-import template if you would rather skip the build.

What it does

The workflow runs two independent jobs against one custom collection you name “New Arrivals”.

  • Auto-add: when a new product is created in Shopify, it is attached to the New Arrivals collection within seconds, so the collection page and any “just landed” section on your theme fill themselves.
  • Auto-expire: once a day, a scheduled job finds every product in that collection that is older than 30 days and removes it, so the collection never accumulates stale stock.

The result is a merchandising surface that stays current on its own. You get the marketing lift of a rotating New Arrivals row without anyone remembering to add or clear products. This is a classic building block of any Shopify automation stack, and it pairs well with new-product announcement emails.

Why it beats the default

Shopify already offers smart collections with a condition like “product added in the last X days”, so it is fair to ask why bother with n8n. Two reasons.

First, Shopify smart collections have no native “added in the last 30 days” condition. The available product-date conditions are limited, and merchants routinely fall back to manually tagging products with something like new and then remembering to remove the tag a month later. That manual tag cleanup is exactly the chore this workflow removes.

Second, a manual custom collection means you drag products in and out by hand. That is fine for ten products and unworkable for a catalog that adds items weekly. By driving a custom collection through the API, you get precise control over both the add and the expiry, on your own schedule, with a rule you can change in one place. You keep a real, editable collection you can also curate by hand when you want to, unlike a smart collection you cannot touch.

What you need

  • A Shopify store with a custom collection named “New Arrivals” (Products → Collections → Create collection → Collection type: Manual). Note its numeric ID.
  • An n8n instance, Cloud or self-hosted (version 1.0 or newer).
  • A Shopify Admin API access token with read_products and write_products scope, connected to n8n. If you have not connected Shopify yet, follow connect Shopify to n8n (2026 method) first, using the Dev Dashboard custom-app flow.
  • About 20 minutes to build from scratch, or a couple of minutes with the template below.

To find the collection ID, open the collection in Shopify admin and read the number at the end of the URL (/collections/123456789). That number is what goes into the workflow.

Node-by-node list

Eight nodes, in two disconnected branches that live in the same workflow.

# Node Type Job
1 New Product Created Shopify Trigger Fires on the products/create topic when a product is added
2 Add to New Arrivals HTTP Request POST a collect to attach the new product to the collection
3 Daily Prune Schedule Schedule Trigger Runs once a day at 03:00 to start the cleanup branch
4 Compute 30-Day Cutoff Set Builds the cutoff timestamp, now minus 30 days
5 Get Aged Products HTTP Request GET products in the collection created before the cutoff
6 Split Products Split Out Turns the products array into one item per product
7 Find Collect HTTP Request GET the collect ID that links the product to the collection
8 Remove from New Arrivals HTTP Request DELETE that collect to detach the product
  ADD BRANCH
  [New Product Created] --> [Add to New Arrivals]

  EXPIRE BRANCH (daily)
  [Daily Prune Schedule] --> [Compute 30-Day Cutoff] --> [Get Aged Products]
        --> [Split Products] --> [Find Collect] --> [Remove from New Arrivals]
  

Step-by-step build

Build the add branch first, then the expire branch. Every URL uses your store domain and Admin API version 2026-04.

  1. New Product Created (Shopify Trigger). Add a Shopify Trigger node, set Authentication to Access Token, choose your Shopify credential, and set Topic to products/create. n8n registers the webhook with Shopify for you. Its output is the full product object, including the product id.
  2. Add to New Arrivals (HTTP Request). Add an HTTP Request node. Method POST, URL https://YOUR_STORE.myshopify.com/admin/api/2026-04/collects.json. Set Authentication to Predefined Credential Type and pick Shopify Access Token API. Turn on Send Body, set Body Content Type to JSON, and paste this expression into the JSON field:
    ={{ { "collect": { "product_id": $json.id, "collection_id": YOUR_NEW_ARRIVALS_COLLECTION_ID } } }}

    Replace YOUR_NEW_ARRIVALS_COLLECTION_ID with the numeric collection ID. Connect node 1 to node 2. The add branch is done.

  3. Daily Prune Schedule (Schedule Trigger). Add a Schedule Trigger node. Set it to trigger every day, at hour 3. This is the entry point for the cleanup branch and connects to nothing above it.
  4. Compute 30-Day Cutoff (Set). Add a Set node. Create one string field named cutoff with the value ={{ $now.minus({ days: 30 }).toISO() }}. This is the only place the 30-day rule lives. Connect node 3 to node 4.
  5. Get Aged Products (HTTP Request). Method GET, URL https://YOUR_STORE.myshopify.com/admin/api/2026-04/products.json, same predefined Shopify credential. Turn on Send Query Parameters and add four: collection_id = your collection ID, created_at_max = ={{ $json.cutoff }}, fields = id,title,created_at, and limit = 250. This returns only products in the collection that are older than 30 days. Connect node 4 to node 5.
  6. Split Products (Split Out). Add a Split Out node and set Field To Split Out to products. The Shopify response is a single object with a products array, so this turns it into one n8n item per aged product. Connect node 5 to node 6.
  7. Find Collect (HTTP Request). Method GET, URL https://YOUR_STORE.myshopify.com/admin/api/2026-04/collects.json. Query parameters: collection_id = your collection ID, product_id = ={{ $json.id }}, fields = id. Shopify does not let you delete a product from a collection by product ID directly; you delete the collect that joins them, so this step looks up that collect. Connect node 6 to node 7.
  8. Remove from New Arrivals (HTTP Request). Method DELETE, URL =https://YOUR_STORE.myshopify.com/admin/api/2026-04/collects/{{ $json.collects[0].id }}.json, same credential. This detaches the aged product. Connect node 7 to node 8. Save the workflow and toggle it Active.

Once active, the add branch reacts to every new product in real time and the expire branch sweeps the collection each morning.

Common mistakes

  • Pointing at a smart collection. Collects only attach to custom (manual) collections. If your New Arrivals collection was created with conditions, the POST will fail. Recreate it as a Manual collection.
  • Using the collection handle instead of the numeric ID. The API wants the numeric collection_id, not the URL handle like new-arrivals. Read the number from the collection URL.
  • Forgetting write scope. A token with only read_products will read the aged products fine but fail on both the POST and the DELETE. Grant write_products as well.
  • Assuming removal unpublishes the product. Deleting a collect only takes the product out of that one collection. The product stays published and reachable everywhere else, which is the intended behavior.
  • Skipping the Split Out node. Without it, the DELETE branch only ever acts on the first product in the array. Split Out is what fans the batch into one item per product.

Cost at realistic volume

This workflow touches no paid third-party service. The only moving parts are the Shopify Admin API, which is free within its normal rate limits, and n8n itself.

Volume n8n executions / month Est. monthly cost
20 new products/month, self-hosted n8n ~50 (30 daily sweeps + ~20 adds) $0 beyond your server
100 new products/month, n8n Cloud Starter ~130 Well inside the Starter execution allowance
500 new products/month, n8n Cloud Pro ~530 A small slice of the Pro allowance

Each daily sweep is one execution regardless of how many products it prunes, because the loop runs inside a single run. Adds are one execution each. Even a busy store stays comfortably within a standard n8n plan, and self-hosted users pay nothing extra at all.

Ready-to-import template

Shopify new arrivals collection automation, ready to import

The full guide above is free to follow. If you would rather skip the build, the downloadable template is the exact eight-node workflow from this post, credential placeholders in place, ready to import and run after you paste in your store domain and collection ID.

Download the template ($14) →

Instant download · works on n8n Cloud and self-hosted. Want it built and connected for you? See our done-for-you setup service.

FAQ

Do I need a custom collection or a smart collection for this?

You need a custom (manual) collection. The workflow adds and removes products by creating and deleting collects, which is the join record between a product and a custom collection. Smart collections build themselves from rules, so the API cannot attach or detach products from them directly.

Will the workflow remove products a customer is still viewing?

Removing a product from the New Arrivals collection does not unpublish it or change its own product page. The item simply stops showing in that one collection. Customers can still find it through search, its direct URL, and any other collection it belongs to.

Can I change the 30-day window?

Yes. The window lives in one Set node expression, $now.minus({ days: 30 }). Change 30 to 14, 45, or any number of days and save. Nothing else in the workflow needs editing, because the products query filters on that computed cutoff date.

What happens if I add more than 250 aged products in one run?

The products query caps at 250 items per page. If a very large catalog leaves more than 250 aged products in one daily run, the extras are pruned on the following days as the queue clears. For a same-day sweep, add pagination with the page_info cursor.

Does this cost anything to run?

No paid service is involved. It uses only the Shopify Admin API and n8n core nodes. On n8n Cloud it consumes a handful of executions per day. On a self-hosted n8n instance the running cost is effectively zero beyond the server you already pay for.

Related guides