Hi everyone,
I’m working on a Shopify > Make.com integration where I’m using the /collections/{{collection_id}}/products.json?limit=250 endpoint to fetch products for a specific collection.
This is what my flow looks like:
- I start with a list of collection IDs.
- For each collection, I call the Shopify API to get all the products in that collection.
- Each collection can contain multiple products.
- I want to store only the id, title, and handle from each product in a variable, so I can use that data later in the scenario.
The Shopify module is returning the correct array of products, and each product object includes the fields I need (id, title, handle).
The problem is: I’m having trouble extracting just those three fields and storing them cleanly in a variable. Either the entire product object is stored, or the expression returns blanks or errors when looping through multiple products.
I’ve tried:
{{ map(1.body.products; “product”; product.id & “|” & product.title & “|” & product.handle) }}
and also:
{{ map(1.body.products; product; product.id & “|” & product.title & “|” & product.handle) }}
But neither works properly when there are multiple products in a collection. I just want to loop through the array, extract the three fields, and store them in a clean, usable format.
Has anyone successfully done something like this and can point me in the right direction?
Thanks in advance!