cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Automate2create
Helper II
Helper II

Error message when building flow - Flow saved failed 'InvalidTemplate'...

Hi there

 

Please can anyone help me deciphering this error message.  I  understand that my template is invalid due to the section 'Create an approval' but what is line 1 and column 4489.  Is line 1 the Approval type?  

 

Automate2create_0-1618322834354.png

 

I have inserted my flow below but I'm not convinced I have set it up correctly.  

 

Automate2create_1-1618323582401.png

Automate2create_3-1618323652714.png

Automate2create_4-1618323683683.png

These are the original flow instructions:

 

Advanced | Flow of the Week: Send parallel approval requests to a dynamic set of approvers | Power A...

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi there

 

Thanks for looking at my question.  When I hover, I get this expression:

 

Automate2create_0-1618327249619.png

 

View solution in original post

7 REPLIES 7
Pstork1
Dual Super User
Dual Super User

The problem appears to be the use of Current Item in the approvers field of the Apply to Each.  if you hover over that field what does the tooltip say?  Where is Current Item coming from?  It should be either an email address or a semicolon delimited string of email addresses.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi there

 

Thanks for looking at my question.  When I hover, I get this expression:

 

Automate2create_0-1618327249619.png

 

That's not a valid selection.  Is the Apply to Each loop inside the Apply to Each Deparment loop?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi Pstork1

 

I've set up the Apply to each Approver inside the Apply to each Department as the instruction below.

(note that the instruction has slightly different names to the current ones.  Apply to each approver and Apply to each department are new names but in the the instruction it is using old names so it was just called Apply to each for both)

 

Automate2create_1-1618390338473.png

 

After that, comes a section of flow with Condition setup.  I have set this up as a new action outside of the Apply to each department > Apply to each approver part of the flow.  I have tried setting it up as an action within the Apply to each department > apply to each approver part of the flow but the options are not available to do this.

 

Automate2create_2-1618390617089.png

 

 

 

 

 

The problem is with your current item.  I think you picked the current item from the wrong loop.  It should just be 

items('Apply_to_each') 

when you hover over it.  I'm not sure how you got references to both loops in that spot.  But its not a valid reference.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Automate2create
Helper II
Helper II

I am further on with the flow but have another block.

 

When testing the flow, getting the following error:

 

Automate2create_0-1618414108392.png

Although the error details say Folder Not Found, the folder definitely exists and the site address (blocked out for privacy reasons) is correct.  The Limit Entries to Folder field actually has an expression in it which doesn't show on this screen for some reason so the snip below is from the actual flow (edit flow).  The instructions show a delimiter before and after the expression but when I add the delimiter after the expression, it deletes the expression (I have also tried putting a space in between the expression and the second delimiter but it makes no difference). 

 

Automate2create_2-1618414733642.png

(when hovering over the FolderName, the expression is variables('FolderName'))

 

 

 

 

 

Limit entries to folder should be just a Folder name or dynamic content.  You've inserted an Odata query.  Remove the Title eq ' and just use FolderName



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,046)