Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

IF Statement in email body

(0) ShareShare
ReportReport
Posted on by 143

Hi,

 

I was hoping for some help with an IF statement within an email body. I would like it to show Green Laptop + Green HW + Green Extra HW if the value for "Green_x0020_Access/Value" is equal/contains "Yes" and otherwise does not show the information.

A copy of my broken IF statement is below:

 

IF Green.PNG

 

if(equals(triggerOutputs()?['body/Green_x0020_Access/Value'],'Yes'),'Green: - [ ] Green Laptop: triggerOutputs()?['body/Green_x0020_Laptop/Value']
variables('varGreenHardware')
Any Extra Green Hardware Requested:
triggerOutputs()?['body/Extra_x0020_Green_x0020_Hardware']','No to green')
  • notepadapp Profile Picture
    143 on at
    Re: IF Statement in email body
    Thank you 🙂
  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: IF Statement in email body

    Hi @notepadapp ,

     

    Please try:

    if(
     equals(triggerOutputs()?['body/Green_x0020_Access/Value'],'Yes'),
     concat(
     'Green: - [ ] Green Laptop: ',
     triggerOutputs()?['body/Green_x0020_Laptop/Value'],
     variables('varGreenHardware'),
     'Any Extra Green Hardware Requested:',
     triggerOutputs()?['body/Extra_x0020_Green_x0020_Hardware']
     ),
     'No to green'
    )

     

    Best Regards,

    Bof

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492