Collections guide
How to bulk create automated collections in Shopify
The CSV format
One row per condition. Rows with the same title (or handle) become one collection with several conditions.
Title,Column,Relation,Condition,Match,Sort Order,Published
Summer Sale,tag,equals,summer-sale,all,best selling,TRUE
Summer Sale,price,less than,100.01,,,
Nike or Adidas,vendor,equals,Nike,any,,TRUE
Nike or Adidas,vendor,equals,Adidas,,,Steps
- Download the template from the builder and fill in one row per condition.
- Drop the CSV into the builder and fix anything it flags.
- Copy batch 1 into Shopify’s GraphiQL app (turn on the products write scope) and run it.
- Check the new collections in your admin, then run the remaining batches.
- To publish them, paste the results back and follow the publish step.
What gets created
Each collection gets a title, handle, sort order, SEO title and description if you give them, and one source with your conditions. “Match all” means a product must meet every condition; “match any” means one is enough.
mutation CreateCollectionsBatch1 {
c2: collectionCreate(collection: {
title: "Summer Sale",
handle: "summer-sale",
sortOrder: BEST_SELLING,
sources: [{
source: {
title: "Summer Sale conditions",
inclusion: {
matchType: ALL,
conditions: [
{ productTag: { relation: TAGGED_WITH, values: ["summer-sale"], matchType: ANY } },
{ variantPrice: { relation: LESS_THAN, value: { amount: "100.01", currencyCode: USD } } }
]
}
}
}]
}) {
collection { id handle title }
userErrors { field message }
}
}Limits
Each collection source can hold up to 60 condition values. “Contains” values need at least 3 characters. Collections are created unpublished; publishing is a separate step. Shopify doesn’t let Starter or Retail plan stores create collections through the API.
More collection guides
- How to create a collection for every product tag in Shopify
- Can you import collections into Shopify from a CSV?
- Shopify automated collection conditions: every type and relation
- collectionCreate ruleSet is deprecated: how to use sources and conditions
Based on Shopify’s collectionCreate docs (Admin API 2026-10) and the Help Center page on collection conditions. Not affiliated with, endorsed by, or sponsored by Shopify Inc. Shopify is a trademark of Shopify Inc.