Help create a bot

Hi, im trying to automatize a little bot, that takes 2 images from a large folder (40 images+) , last and second last, marks them as “done” (so the program wont just keep analyzing 2 same images forever) and goes to the next last and second last until there are no more images left. All of that goes to Chatgpt, which has to take 2 images. How would you do it? I tried playing with iterator and aggregator but it created weird bundles. For example i had 8 images in a folder, and firstly it created 1 large bundle with 8 images (incorrect), when adding some tweaks it created 8 bundles with one image inside each of them. My goal would be to make a bundle that has 2 distinct images (last, second last and then the second last, second second last and so on) inside them. How would you do that? Id really appreciate if the response would be easy to follow through, as i am not that well experienced in the site as of now.