Paginate Shopify Products with GraphQL Cursor-based Navigation

Nodes

0e09a202-a921-409d-ae64-7462d70543f4

Categories

Created by

elRichard Uren

Last edited 58 days ago

Shopify GraphQL cursor loop

Many Shopify GraphQL queries have the ability to return a cursor which you can loop over, however the N8N GraphQL node does not natively have the ability to fetch pages.

This simple 3 node workflow displays how to setup a cursor to fetch all items in a collection.

Note : The pageSize in the "Shopify, products" node is set to 5 to illustrate how querying by cursor works. In production set this to a much larger value.

Also, Update the Endpoint in GraphQL node to reflect your Shopify store.

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!