Help

Re: Map each iteration of an array

1377 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Jaxtraw
4 - Data Explorer
4 - Data Explorer

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.

Screen Shot 2024-01-01 at 6.58.40 PM.png

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.

Screen Shot 2024-01-01 at 7.38.00 PM.png

Screen Shot 2024-01-01 at 7.39.35 PM.png

1 Reply 1
ScottWorld
18 - Pluto
18 - Pluto

Hi @Jaxtraw,

I'm not sure I completely understand your current dilemma, but I recently gave an entire 20-minute presentation on how to handle complex arrays (i.e. attachment fields & user fields) using Make's Airtable automations.

It's very possible that my presentation will help guide you on how to solve your problem. You can watch it all on this episode of the BuiltOnAir podcast, and let me know if it helps get you closer towards a solution!