Process attachments in specific order

Hello,

I am getting 2 files to my webhook, and they always start with the letters KU and NA. The scenario needs the information from the KU-file to be processed first, but I can’t be sure that it is the first file. How can I change my scenario to account for this, to always process the KU-file before the router says to process the NA-file?

Note: My scenario always works if the KU-file is the first attachment, so just need to make sure this will process first whenever the 2 files arrive.

Thank you

Welcome to the Make community!

Please provide the output bundle of the Webhook/Trigger module [2] by running the scenario, then click the white speech bubble on the top-right of the module, save the contents as a text file, and upload it here into this discussion thread:

Screenshot_2023-10-06_141025

This will allow others to better assist you. Thanks!

3 Likes

Hello Charle,

do you need the router with the two IF statements after it? Can you not process the files sequentially?

Alternatively you can sort the array first to make sure the KU file is the first item: https://www.make.com/en/help/functions/array-functions#sort--array---order----key--

3 Likes

This was very valuable to me, thank you. I managed to solve my issue using this information.