Flow to add a newly published product to the top of a collection

Topic summary

Goal: Automatically push a newly published product to the top of a tag-based (automated) collection when it becomes visible online, without relying on product creation date or draft→active status (all products are already Active for POS).

Proposed approaches:

  • Use Shopify Flow as a base (template “Add products with a tag to a collection in the future” suggested), then reorder the collection.
  • Set the collection to Manual sort and call the Admin GraphQL mutation collectionReorderProducts via Flow’s “Send HTTP Request” to move the product to the first position.

Triggers and gaps:

  • No native Flow trigger for “published at.” One suggestion: trigger after the action that adds a product to a collection, but this doesn’t help if collections are automated and not managed by Flow.
  • A related use case wants to trigger when a product first has media and in-stock inventory, then push it to the top of every qualifying collection; how to obtain product/collection IDs automatically for the API call remains unanswered.

Disagreement:

  • Whether automated collections can have their order changed: one response says no; another says yes if Manual sort is enabled and using collectionReorderProducts.

Status: Unresolved; key open items are a reliable Flow trigger and ID automation for API calls.

Summarized with AI on January 8. AI used: gpt-5.

Hello!

I would like to create a flow to move a product to the top of a tag based collection when the product is published to online store.

I cannot find a simple way to do this. Some notes:

  • Products are not published to the online store in the order they are created. Some products are not published to the online store for months after being created. This means we cannot sort the collection by “Newest to oldest”
  • All products are currently Active as they are published for Point of sale
1 Like

Hello,

There is a template “Add products with a tag to a collection in the future” you should be able to find in your store. It may be a good start to help you do what you want to do.

If it doesn’t help, maybe I misunderstand your problem. Perhaps you could explain a bit more.

Hello, thank you for your reply. Our collection is based on a product tag, so all products with the tag are in the collection. I would like a flow that adds a product to the top of a New Arrivals collection when a product is published on the online store.

Some further notes:

  • Products are not published to the online store in the order they are created. Some products are not published to the online store for months after being created. This means we cannot sort the collection by “Newest to oldest”
  • All products are currently Active as they are published for Point of sale, so running a flow for status change from draft to active will not work.

You’d probably need to use the manual sort option for the collection in conjunction with the collectionReorderProducts mutation. How many products do you have in that collection roughly?

Hello,

We are facing the exact same issues with the way Shopify is using the newest to oldest sorting in collections. Not using the published date, but the creation date is frustrating so say the least. We also have all products on active for POS reasons,.

Did you manage to find a solution for this yet?

The answer is along the lines of what Kalen posted. After you add the product to the collection you need to use Send HTTP Request to call the API to update the order. collectionReorderProducts is the name of mutation to call: https://shopify.dev/docs/api/admin-graphql/latest/mutations/collectionReorderProducts

For it to work, your collection should be manually sorted

Thank you Paul.

I’m not sure what would be the trigger here to start the flow? As there is
no ‘published at’ trigger.

Also, how would I automate the collection and product ID data to send in
the webhook?

My assumption here is that you are using Flow to add a product to a collection, so you would just place the API call after that action.

I’m not sure of your exact use case then, so you need to provide more detail on when you need to change the sort order.

Hi Paul,

Thank you for taking the time to help me.

In our case we have set up automated collections, so not using flow to add
a product to a collection (we have a lot of them).

What we want is that whenever a product receives media (at least 1), and
has available stock, thus a new item in the online store, it gets pushed to
the first position of every collection it falls in.

Is that doable with Flow?

I don’t think you can change the sort order on an automated collection.

Yeah you should be able to change the sort order on an automated collection if it has manual sort order enabled by using the collectionReorderProducts mutation.

Notes on this currently the send-http-request will NOT work for basic plans, it needs Grow, Advanced, or Plus.

Meanwhile another dead end can be if trying to do this with the send-ADMIN-api-request it will NOT work because the collectionReorderProducts mutation is a job-return endpoint

Which Flow does NOT support asynchronous/job mutations in the send-admin-api-request limitations.

In that situation you’ll either have to do things like wipe the collection and readd everything, or use workarounds if this is mainly for an online-presentation to plop new products ontop of a collection.

Also see


Example of send-http disabled on a basic plan store