cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crp_
New Member

Filter Excel data and send one email based on condition

Hi there, new to Power Automate and I've been stuck on this for days. Seems really quite basic.

 

All I'm trying to do is filter a few rows of data based on a condition (price > $500.00 - so should return AMZN) and send an email. The data is below:

 

crp__0-1642493862118.png

 

This is the flow:

 

crp__1-1642493998581.png

 

This is what is fed into the array:

 

crp__3-1642494172207.png

This is the output: 

 

crp__2-1642494115247.png

 

Not entirely sure what's going on here, but any help is greatly appreciated.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
crp_
New Member

Hi all,

 

So this was the final result:

 

crp__0-1642503404957.png

 

 

Everything works perfectly. I hope this helps someone in future. 

View solution in original post

4 REPLIES 4
crp_
New Member

Just commenting so far because I've managed to overcome the filtering issue by changing price to a float type with the following: float(item()?['price']) and then also doing the same with the value (wrapping it in a float type) - so in this instance float(500). 

crp_
New Member

Hi all,

 

So this was the final result:

 

crp__0-1642503404957.png

 

 

Everything works perfectly. I hope this helps someone in future. 

v-xiaochen-msft
Community Support
Community Support

Hi @crp_ ,

 

Glad to see you solved the problem.

You could mark yourself as a solution.

 

Best Regards,

Wearsky

Also, just to note here - for the email part, take the email outside of the 'apply to each' loop. This prevents the email sending multiple times (because otherwise you're iterating through the rows). You only want to do this once, so use an initialise variable and loop through the data then use an append to variable. Then attach variable to the email. 

 

Should look like this:

 

crp__1-1642668612661.png

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,240)