Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Show field values in outlook email only if condition satisfies

(0) ShareShare
ReportReport
Posted on by 384

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

  • v-jefferni Profile Picture
    v-jefferni on at
    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,

  • vivekpande18 Profile Picture
    vivekpande18 894 on at
    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

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard