cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RedK
New Member

The template validation failed(..)

I get this message in a Flow:

 

The template validation failed: 'The template action 'Condition' at line '1' and column '1668' is not valid: "Unable to parse template language expression 'contains(body('Create_item')?['Subject'], ''1332'')': expected token 'RightParenthesis' and actual 'Integer'.".'.

 

The idea is that when a new email arrives it creates an item in a SharePoint list. The Subject of the email gets copied into the a list item. Then it is going to send an email. But only if the subject does not contain '1332'.  So I made a condition. See image below. Does anyone have any idea what might be wrong?

 

Capture.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

 

Hi RedK,

 

Please change the condition to the following and test if this one works.

1.PNG 

 

Regards,

Mona Li

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-monli-msft
Community Support
Community Support

 

Hi RedK,

 

Please change the condition to the following and test if this one works.

1.PNG 

 

Regards,

Mona Li

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you!

_nakul
Microsoft
Microsoft

There's another scenario where you might encounter similar error and that is when you are trying to use the item from the loop and initializing a variable based on the current item that you are looping through. In such case try using the item()['<field name>'] expression than the outputs('<previous step name>')?['<output field name from the previous step>']. Hope this helps.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,867)