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.

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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,324)