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 / Issue with saving my flow
Power Automate
Unanswered

Issue with saving my flow

(0) ShareShare
ReportReport
Posted on by 8

Hello everyone,

 

I am pretty new to power automate and have run into an issue with saving. This is the message displayed at the top when I try yo save: Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'For_each_3, For_each_2' referenced by 'inputs' in action 'Get_Attachment_(V2)' are not defined in the template.'.'.. 

I am really confused by this since For each 2 and 3 dont exist in my flow and I also cant find a way to add them under actions. What should I do? Any help is kindly appreciated!

 

Some background info about my flow: I am trying to automate uploading both the body and the attachment of certain emails to a SharePoint folder

Unrelated: Would it be better top use the desktop version to achieve this goal?

I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Hi there, 

     

    No, Power Automate (cloud) is what you want for this. Power Automate Desktop is for robotic process automation - use it for things you can't access via APIs / pre built connectors.

     

    For your flow - it says the references are broken, meaning that they WERE there, but were removed.

    Are you able to show a screenshot of your flow in edit mode, showing how you have it set-up? It will be easier to assist you.

     

    Cheers,

     

    R

  • s2584111-bs Profile Picture
    8 on at

    Hello R, 

     

    Thanks for the quick response.

    Screenshot 2024-04-05 110731.png

    This is my current flow. Before this I had the same flow without the Create file 1 action. Unfortunately the previous version only uploaded the body to Share point but not the attachment, which is why I inserted the action to hopefully fix this. Also before this the for each 2 and 3 did exist in my flow I didn't add them myself however. I felt like the for each 2 and 3 created multiple copies of the body in the SharePoint which is why I deleted them, this might be wrong though.

     

    I hope this helps as context, if you have any additional questions let me know

     

  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Hi there, 

     

    Thank you for the screenshots! I'll need to see the configuration inside of each one. Your error says that you are still referencing deleted "apply to each" content, so I want to help you make sure that's cleaned up.

     

    On another note, you are triggering on a "when an email arrives" -- just to make sure: are you intending that one email arriving will trigger the collection of similar emails for processing? Or did you only want to work with that one email? I'm also not sure what your first "Create File" is doing, since there is no "Get File Content" in your flow.

     

    R

  • s2584111-bs Profile Picture
    8 on at

    Hi R,

     

    For the emails: I do not want to upload all emails to SharePoint only certain ones, that have a certain number combination in the Header. I do not know the exact number combination yet but I dont think it will change. So only emails that have this number combination should be uploaded to SharePoint.

     

    Here are the screenshots for each Action: (I had to cut some parts of the Create File(SharePoint) Action since it is confidential information)

    action 1.png

    Action 2.png

    Action for each.png

    Action 3.png

    Action 4.png

    Action5.png

    Note: I realized that my date with dd/MM/yyyy didnt work😅

  • s2584111-bs Profile Picture
    8 on at

    *Just for clarification the pictures starting with Folder Path are the two create file in SharePoint actions

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 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard