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 / I get an error Invalid...
Power Automate
Answered

I get an error Invalid Template

(0) ShareShare
ReportReport
Posted on by 6

 What I like to accomplish is following:

 

When I add a file in a specific folder it should open my outlook email and create a new blank email with the added file as an attachment. After the proces is done it must delete the file from the folder.

 

I get following error:

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'Compose' are not defined in the template.'.'
 

This is how my flow looks like:

 

antman_0-1688633002551.png

antman_1-1688633039941.png

 

Any suggestions in here for a solution?

Categories:
I have the same question (0)
  • Verified answer
    trice602 Profile Picture
    16,135 Super User 2026 Season 1 on at

    Hi @ant-man ,

     

    I did a test and it was successful.  My question is what is the purpose of the compose and the apply to each?  If the trigger is when a new file is created, it's going to fire on each file created and the compose is the email content for the send an email (V2) - I am just putting those details in the V2 action (I didn't see where you are referencing your compose) but again, I was able to get an email and see the file deleted.  I did put a 1 minute delay in there, may not be necessary but added to ensure the email went out before deleting.

     

    If this works for you, please mark as a solution so others can find it quickly too!  Always glad to help!  Tom

     

    file created - email - delete2.pngfile created - email - delete1.png

  • ant-man Profile Picture
    6 on at

    I tried to do my compose once again and then it worked as a charm.

    I accepted your solution and thanks for quick response.

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