web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : kIVnVmPkDufbaJcCWAfz5/
Power Automate - General Discussion
Unanswered

Show field values in outlook email only if condition satisfies

Like (0) ShareShare
ReportReport
Posted on 27 Jul 2022 18:03:49 by 386

Hi,

 

I have a power automate email flow and it's sending email when item is created in sharepoint list. In email, all list column values are in the email body. But I want to show column values only if condition satisfies.

 

Ex: If Column 1 value is greater than 75% then only I want to show in email body.

If column 2 string contains "xxxx" then only show in email body otherwise hide....etc

 

Is this possible? If yes, how to achieve this? 

 

In email

I have the same question (0)
  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on 27 Jul 2022 at 18:18:00
    Re: Show field values in outlook email only if condition satisfies

    Hi @aaedla ,

    Yes this is possible by dynamically creating the html body content for the email. 

     

    1- create thel array of the internal name of the columns which you want to add conditionally. 

    2. Loop through alll the internal names and create the expression to get the column value. 

     

    Thanks 

    Vivek pande

     

  • v-jefferni Profile Picture
    on 03 Aug 2022 at 09:43:45
    Re: Show field values in outlook email only if condition satisfies

    Hi @aaedla ,

     

    For those columns which need to check conditions, you can create a number of variables with if function in their expressions.

     

    E.g. Column1

    variable1:

    if(greater(triggerOutputs()?['body/Column1'], 0.75),triggerOutputs()?['body/Column1'],'')

    vjefferni_0-1659519707091.png

     

    You can use these variables in body of Send an Email action.

     

    Best regards,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard
Loading complete