For each for only n records

Hi in one of the automations that I am doing we need to upload files and we can attach only 5 files at a time, once 5 files are attached in need to click on “attach” and repeat for all the files in the folder. the browse button element /select has unique id (iattch0, iattach1, etc).

please let me know how can automate this


the for each Activity has an output called index and returns the current count of the loop (0,1,2,…)

You can experiment with the Modulo function for calculating the dynamic selector index numbers like:

This could help you on a minimal modelling approach