What is your goal?
I want to iterate through email attachments in a given order: first word-file(s) than images than rest.
I want to iterate through email attachments in a given order: first word-file(s) than images than rest.
Hey Stephan,
you can use the sort() function to sort arrays.
I found that function. I don’t understand how to use that for my problem. What I’m looking for, is to use the “Email Iterate Attachments” in a given order.
You can use an aggregator module to rebuild the array and then use an iterator module with the sort function applied there.
Welcome to the Make community!
There is no such feature in the Email “Iterate Attachments” module yet.
What a great idea—I’m sure others will agree that this would be nice to have too!
If this is important to you, please submit this suggestion to the Idea exchange, under App Improvement Ideas. However, do search for a similar request first (and also upvote), just in case it has already been suggested to avoid duplicates.

— @samliew
May I propose this workaround:
You’ll need a minimum of 7 modules, with relevant filters.
1. You’ll need an Iterator-Aggregator pair for each type of attachment you want to extract from the array.
2. Then, one more pair for “others”, you filter out the attachments using the arrays from the previous groups array outputs.
3. Finally, you use a module to merge the arrays from the groups together.
![]()
This is just an example. Your final solution may or may not look like this depending on your requirements.
— @samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!