Showing results for 
Search instead for 
Did you mean: 
Level 8

Flow Hangs on Apply to Each.

I have a few flow that started acting up. On Apply to Each it says that it successfully ran but as I look into it there's no data to be provided. Only when I maunally press "Resubmit" will the flow actually run. Is there a fix for this?



Community Support Team
Community Support Team

Re: Flow Hangs on Apply to Each.

Hi @hnguy71 ,


Could you share screenshots of Flow configuration?

If you want to save the attachment in the list item to the specified library, please make sure that list item does contain the attachment.

If there are no attachments, Apply to each traversed Body will be an empty set, and the actions contained in it will not be executed.


Or you could consider adding a Condition to determine whether the current item contains an attachment, and only execute the following action when the attachment is included.

Expression reference:


Image reference:


Hope it helps.



We can use Has attachments directly to determine if an attachment is included in the item.



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.
Level 8

Re: Flow Hangs on Apply to Each.

Good morning, @v-bacao-msft 


Here's my full flow config:




The logic is to:

1. When an item is created

2.  Set variables to retrieve: Folderpath, CreatedBy, Geomarket, ProductLine, DocType, Month, Year, TeamAddress

3. Get Items in SP List filtering out by Geomarket, ProductLine, DocType, Month, Year

4. Set variable Count:  length(body('Get_items')?['value'])

5. Each item created has 1 attachment. There's no need to do a check if it exists. Retrieve file attachment ID

6. Apply to each:

  • Get attachment content
  • Get file extension from original file
  • Create new file in MS Teams with standarized naming convention and original file name extension.

7. Get file content using path: Checks to see if the file was successfully created in MS Teams

8. If not, Failed Scope: Email user.


Here's my Apply to each step that's hanging:



Helpful resources


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


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!


Power Platform World Tour

Find out where you can attend!

Users online (6,652)