Merge Items after Looping with Filter

Hey guys,

I am currently trying to get results via Shopify GraphQL. I use the filter node create the cursor attribute and loop through pages. As long as there is a nextpage, the filter returns true and goes back into the loop.

This works great, I get all my results out after 3 runs.

My goal is to write a single JSON file and upload it to an ftp server.

However, I can’t manage to combine these 3 items into one single item. No matter how I combine the Merge node, I can’t get it to work.

Please share your workflow

I think I am missing some crucial part here and appreciate any input!

Best
Mark

Hey, can you try using the Aggregate node and put it after the False output of the IF node? This will combine individual items in to one. Another method is to use a code tool which will also enable you to modify the JSON output schema precisely.

Hey @krisn0x,

Thanks for your reply

The False will only output the last item since all items before return true. In this case I would only have 1/3 of the data I need, right?

What you could try is pre-calculate the number of iterations for your query from metaobjectsCount and desired pageSize. Then simulate the loop over that number of pages with loop over items and collect the output through the done branch.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.