I have an Airtable Base with a document upload field. I take the URL of the documents and map that to a JSON to pass through an API.
Sometimes, users will upload multiple documents to that table. The output URLs are in an array. I have a pdf module that will combine the PDF files into a single URL. I just need to map all the URLs in the array to the module.
However, I am having a very tough time doing this. From the Airtable module, I can only map the first URL in the array. If I use an iterator, I cannot map each iteration in the same module. If I put the pdf module after an aggregator, I can again only map one iteration. I cannot set a variable of both iterations in between the iterator and the aggregator. I tried setting a variable but ran into the same issue where I can't map more than one iteration.
I solved this issue in another scenario with email attachments by creating a Drive folder, uploading everything to that drive folder, and sharing a link to the folder.
But I can't do that here, as I don't know how many docs are uploaded, and I'd have to map a different path for each number of documents in the folder with LEN().
Does anyone know how I can solve the problem of mapping multiple (unknown number of) URLs in the upload file field to a JSON? Chat GPT suggested using a loop and mapping each iteration of the loop, but I don't know how to do that.