Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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?

  • ant-man Profile Picture
    6 on at
    Re: I get an error Invalid Template

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

    I accepted your solution and thanks for quick response.

  • Verified answer
    trice602 Profile Picture
    13,760 Super User 2025 Season 1 on at
    Re: I get an error Invalid Template

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,603 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow