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
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'],'')
You can use these variables in body of Send an Email action.
Best regards,
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