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 Automate
Answered

Apply to each issue

(1) ShareShare
ReportReport
Posted on by 24
Good afternoon, 
 
I wonder if someone could help me with an issue I am experiencing:
 
I created a flow that compiles all the html files from one Sharepoint folder to a .md document on a weekly basis.
The logic is to initialize a string variable, to get files (properties only) from the SharePoint folder, and to Apply to each using the dynamic content - body/value (list of items) from the get files step, within the loop append to the string and eventually create a file.  
 
This morning, the flow ran for the first time and was successfully. However, I found the resulting document too long so I wanted to experiment compiling them by 20 articles per batch. As a result, I saved the live and running flow as a testing one, closed the up and running one, and started working on the testing one. 
 
When I finished modifying everything and wanted to save and test, it would not save and told me that: The input parameter(s) of operation 'Apply_to_each' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Apply_to_each'.
 
I have not changed anything so I found this error message strange. Nonetheless, I emptied the values in Get Files (properties only) step and manually put in the correct site and folder information. Then I removed whatever that is the input in "Apply to each" and replaced it by dynamically chose the body/value (list of items) from the previous step. When I hit save, it's still showing the same error message. I tried to repeat the above with no success. I then tried to ask copilot and gemini for fix: outputsbody('Get_files_(properties_only)')?['value'] or outputs('Get_files_(properties_only)')?['body']?['value'] and neither of them works. 
 
I also create a new flow from scratch, it saves after I set up "Apply to Each" but not after when I finish everything. The same issue came up. 
 
In the meantime, the original file compiling flow is always working fine. 
 
Any idea what could have caused this and how I might fix this issue?
 
Thanks,
Rita
 
 
 
 
Screenshot 2026-01-12 135735.png
Categories:
I have the same question (0)
  • Verified answer
    CFernandes Profile Picture
    8,504 Most Valuable Professional on at
    Hey @RitaHL
     
    Did you renamed actions above the Apply to each loop?
     
    1. Delete Apply to each
    2. Delete Get files (properties only)
    3. Save the flow
    4. Refresh the browser
    5. Re-add Get files (properties only)
    6. Add a Compose action
    7. Insert any dynamic field from Get files (properties only) into the Compose
    Power Automate will automatically create and correctly bind the Apply to each loop again.



     
    If it helped you, please click "Does this answer your question?" and give it a like or mark it as Solution, it helps others in the community find answers more easily!
    Connect With Me:
    💼 LinkedIn: Clavin Fernandes
    📺 YouTube: Clavin Fernandes
    📝 Blog: clavinfernandes.wordpress.com
    🌐 Community Website: PPUG.org
    👥 Join our Community: Power Platform User Group
  • Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @RitaHL,
     
    Just select the value from the dynamic content; there’s no need to write it manually in the expression.
     
    Expression:
    outputs('Get_files_(properties_only)')?['body/value']
     
    If you are still facing an issue, could you please send a screenshot of the entire 'Apply to Each' and 'Get Files' actions so we can check whether you have updated the action names correctly?
     
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
     
  • Suggested answer
    RitaHL Profile Picture
    24 on at
    Thanks! This sort of helped. 
     
    1. Delete Apply to each
    2. Delete Get files (properties only)
    3. Save the flow - I did end up losing many steps I set up in the loop. 
    4. Refresh the browser
    5. Re-add Get files (properties only)
     
    And it works again...

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard