Hello !
I'm pretty new to Power Automate. I'm an intern at a company that recently asked me to make Power BI dashboards based on Bitdefender Gravityzone data. The problem is that the only way I can get this data is through scheduled emails, which are sent to me every hour and have a .csv attachment.
So what I would like to do is to get these attachments automatically (so that the table can run without the need of anyone's intervention). After some researches, I find Power Automate.
So I make a little script.

In details, it :
• Delete and recreate the local folder, to remove the older versions of the files
• Copy the attachments of the mails from a specific folder of my mailbox and mark those mails as read
• Delete all the mails which from that folder
When I try it, either with the normal "Run" or the "Run next action", it does not give me the expected result. Finally, from a display point of view on Outlook (on app or on navigator), even when reloading the page, it doesn't show me the mails as read, neither they appear deleted. The results of the run (aka. the files I get in the created folder) also seem inconsistent, but I'm considering the possibility that the display in Outlook isn't quite right and that it's making me analyze the situation wrong.
Can you confirm if this script is supposed to work, and if there may be display issues in Outlook ?
I also had another question for you. When I have several files in the same folder on Outlook, in which order are they read ? From the most recent to the oldest, or the opposite ? Because if I have several versions of the same file in the folder and it takes the attachments of the oldest first, it causes me a problem for Power BI, since the updated files are the most recent.
And in case it defaults to taking the oldest first, is there any way to reverse the selection order ?
Thank you for reading !