Download a file from an array

Hi.

I have a combo of an iterator + array aggregator that helps me extract a list of ids from a JSON file.

With these ID’s, I can access a link (Make a request) that the outcome is another JSON, where I will find a URL that I need to use to download a PDF file.

Question: How can I connect the Array Aggregator with the Make a Request and the Get a File so I can download as many files as I can list from the array?

What I have done:

No success, of course.

Any ideas to help me here with this? :slight_smile:

Thanks!

You can use repeater module and set the numberof repeats to length(array) and use the i variable in the get file module to iterate but the would consume a lot of operations

You don’t need the aggregator module. You can map the ID directly in the Get a File module and it will run once per id retrieving the files one at a time. Depending on your flow, you can add the aggregator back after the Get a File module to combine the files in an array.

@Stoyan_Vatov @abhilash_naik

I tried something different, as I described here, but didn’t work, so I had to get back to this:

(Both branches do the same, the difference is the filter I am trying to implement)

Now that things are clearer for me, I understand that I need to:

  • Make a request using composed links based on id’s extracted and stored in Google Sheets.
  • I need to run this Make a Request and Get a file set based on the number of ids I have extracted and stored.

@Stoyan_Vatov I used the Array Aggregator in this flow because I need to use a Regex to clean the IDs coming from the JSON:

1 Like