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 / Expression is invalid ...
Power Automate
Answered

Expression is invalid - Add x if email contains y

(0) ShareShare
ReportReport
Posted on by 43

Good day, 

 

I'm working on a flow that generates an excel report based off an email from a user.  I'm able to capture majority of the information I need but am stuck on populating a column based off a condition being met. 

 

Tried working on the expression but it says invalid.  Not 100% sure what I'm missing as it seems like a fairly straight forward condition.  I've listed the expression below that I'm trying to make valid any help would be much appreciated. 

 

if(triggerOutputs()?['body/body']contains("slower"),"downtrending","uptrending")
 
basically looking to check the body of received email for the word "slower".  If it contains "slower" populate "downtrending" else "uptrending" if false. 
 
Screenshot below for reference: 
 
MattMack_0-1658202224504.png

 

 

Categories:
  • Verified answer
    365-Assist Profile Picture
    2,327 Moderator on at

    You could try something like this

    365Assist_0-1658204095742.png

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • Verified answer
    MattMack Profile Picture
    43 on at

    took a different approach and was able to solve.  

     

    MattMack_0-1658204096489.png

     

  • MattMack Profile Picture
    43 on at

    Thanks Darren, looks like that'll work too.  Figured out similar solution just about the same time as your reply.  Thank you! 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard