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 / Building Flow - Apply ...
Power Automate
Unanswered

Building Flow - Apply to Each error

(0) ShareShare
ReportReport
Posted on by

Hello - I am trying to build a Power Automate flow to update the SharePoint list based on the data in the Excel table. But am receiving the following error (screenshots of the flow attached): "Flow save failed with code 'InvalidTemplate' and message 'The template validation failed:  'The inputs of template action 'Update_item' at line'1 and column'2887' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Update_item' to be referenced by 'repeatitems' or 'items' functions.'.'.

 

Any suggestions or help? I am new to Power Automate.

Screenshot 2024-02-06 at 4.14.41 PM.png
Screenshot 2024-02-06 at 4.14.31 PM.png
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @jghafoor It's never a good idea to nest a Get Items action inside an Apply to Each action. Instead, you need to have your Get Items action outside of the Apply to Each action and use a Filter Array action instead. 

     

    I cover this exact scenario in the first part of my YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?

     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.

    1️⃣ Cross-Referencing Data

    2️⃣ Filtering by Key

    3️⃣ Substring Matching

     

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

     

    IN THIS VIDEO:

     3 Ways to Use the Filter Array Action

    How to use the Scope Action to Group Actions

    How to Check the Number of Items returned from a Filter Array Action

    How to Cross-Reference Data in Excel with a SharePoint List

     How the Filter Array Action Works

     How to Access the Dynamic Content from a Filter Array Action

     How to Filter Items by a Key

    How to Filter Items by Matching a Substring

    How to Use Multiple Conditions in a Filter Array Action

     

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response! If you're feeling generous— ️  Buy me a coffee: https://www.buymeacoffee.com/acreativeopinion

    👉Watch my tutorials on YouTube
    👉Tips and Tricks on TikTok
     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard