web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow Hangs on Apply to...
Power Automate
Unanswered

Flow Hangs on Apply to Each.

(0) ShareShare
ReportReport
Posted on by 347

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?

 

apply_to_each_hang.PNGresubmit.PNG

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    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:

    length(body('Get_attachments'))

    Image reference:

    21.PNG

    Hope it helps.

     

    Edit:

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

    22.PNG

     

    Best Regards,

  • hnguy71 Profile Picture
    347 on at

    Good morning, @v-bacao-msft 

     

    Here's my full flow config:

     

    flow_config1.PNGflow_config2.PNG

     

    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:

     

    flow_config3.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard