Creating a JSON string that feeds a PDF.co templat

I am fairly new to Make, and I am almost finished with Make Academy Intermediate course. Currently I am building a scenario that is triggered from Airtable. The Airtable automation uses a Script to send the calling recordID to a webhook which shares the recordID with a series of Airtable-Get Record modules. There are enough modules to pull in all the linked records from the original recordID table. These records are from a nursery orders database and pull data like Customer Name, Shipping Address, PO No, etc. The final Get Record pulls in the order line items which have to be separated into bundles through an iterator and then passed to a final Get Records which gets the data from a Packing Slip Items Table. All the data must be pulled together into a JSON string that can be sent to PDF.co via the Make PDF API Call module. The JSON string is used to fill in a template for a Packing Slip I have saved there. Making the JSON is where I am stuck. The bundles I need are available downstream of the Array Aggregator, but I can’t structure them correctly to get the correct results in Aggregate JSON module to get a viable string that works with the template. I have tried several iterations and have been able to get the PDF to create with all the correct top of sheet info but only the first line item listed in the packing slip contents with a multiple item order. I have also gotten the JSON to structure correctly creating a PDF that has multiple lines for the Line Items, but no data was pulled through (bad mapping?) I have share multiple screenshots in hopes that it will help someone understand what I may have setup wrong. Thank you!

I was able to solve this on my own. I didn’t need the Aggregate to JSON module and traded it out for a Create JSON instead. I then built the data structure with the Items as Array with Collection under it containing Item, Description, Quantity_Shipped, Quantity_Ordered. I then went into Array Aggregator and changed its target structure type to the Create JSON structure. Last step was to map the array output from the Array Aggregator to Item in the Create JSON. Then voila!

Hey @Chad_Vargas, congrats on figuring this out, and thank you for taking the time to step back and share what you learned with everyone here. This could be super helpful to many others who are facing a similar situation in the future. :folded_hands: