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 / The template validatio...
Power Automate
Answered

The template validation failed(..)

(0) ShareShare
ReportReport
Posted on by 4

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

 

Categories:
I have the same question (0)
  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

     

    Hi RedK,

     

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

    1.PNG 

     

    Regards,

    Mona Li

     

  • RedK Profile Picture
    4 on at

    Thank you!

  • _nakul Profile Picture
    Microsoft Employee on at

    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.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 953

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 622

Last 30 days Overall leaderboard