Showing results for 
Search instead for 
Did you mean: 
New Member

HELP! Export emails with "DO UNTIL" a value is changed to Closed

Hi there, 

I am in need of some assistance. I have successfully created an approval workflow, which once approved, would then create a folder and copy another folder items into that folder. 

The next stage of the flow is to export emails when they arrive in a shared mailbox into that specific folder. I have managed to do this, but unsure how to program the DO UNTIL function so that it continues to export any emails in the shared mailbox, until a value in this specific list item is updated to CLOSED. Can anyone help me achieve this. 



Community Support
Community Support

Re: HELP! Export emails with "DO UNTIL" a value is changed to Closed


Hi @mhannaway ,


There are multiple Apply to each in your configuration, and the Export email action is located in these Apply to each, so it will determine the number of times the Export email action needs to be executed according to the number of items obtained by Get items.


You need to try to optimize this structure. And I think adding two triggers in Flow is not recommended, you can try to split this Flow into two Flows to achieve your needs.


Please provide more details about your needs so that we can provide the appropriate workaround.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
New Member

Re: HELP! Export emails with "DO UNTIL" a value is changed to Closed

Thanks for your feedback barry. Basically what I am trying to achieve is to ensure every email that comes through in a shared inbox with a specific reference number in the subject line matches the reference number in the folder created and therefore exports and creates it in that specific folder. 


I'm thinking theres got to be an easier way in a seperate flow to export the file, but how do I ensure, it goes into a specific folder containing the same reference ID, if its in a seperate flow (how will it pick up the reference number?). 


Any thoughts would be highly appreciated.



Helpful resources

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!


Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,939)