cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
naokichia
Frequent Visitor

Send only one email based on multiple rows

Hi I am trying to build a flow with a condition that will send email if the condition is met. 

 

However, my SP list has multiple rows and I need it to send the email only after checking all rows and all rows met the condition stated. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @naokichia 

Do you want to filter out items whose value of column 'PO Ship-...' is equal to 'Chaiwan - Hong Kong' and whose value of column 'Purch’s P...' is empty and then send them in an email?

What data type are your two columns in sharepoint?

vLilyWmsft_4-1638250123479.png

Assume I have a list like this.

vLilyWmsft_5-1638250312004.png

I set up a flow, you can take a try with the following screenshots.

vLilyWmsft_1-1638249513918.png

Add Filter array action and switch to advanced mode by clicking 'Edit in advanced mode'. 

@and(equals(item()?['POShip_x002d_route'], 'Chaiwan - Hong Kong'),equals(item()?['Purchs'], null))

Note: Where 'POShip_x002d_route' and 'Purchs' are the internal names of column 'PO Ship-route' and column 'Purch's' respectively.

vLilyWmsft_2-1638249538508.png

You can find column internal name via List settings -> Click on the column name -> It’s at the end of the URL on the Edit column page, after ‘Field=’.

vLilyWmsft_3-1638250023818.png

Add Select action and configure it.(The name placed in item() is the internal name of the column.)

vLilyWmsft_6-1638250560183.png

vLilyWmsft_7-1638250727896.png

vLilyWmsft_8-1638250749376.png

Save and test the flow.

After flow runs, items that meet the filter conditions will be filtered out and send an email.

vLilyWmsft_10-1638250943012.png

 

vLilyWmsft_9-1638250882675.png

Hope the content above may help you.

Best Regards

View solution in original post

3 REPLIES 3
VictorIvanidze
Community Champion
Community Champion

Could you show your flow?

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

naokichia_0-1638164143227.png

 

Hi @VictorIvanidze this is my flow, but currently it is sending multiple emails, I like it to send only one mail once it scans the whole list. 

Hi @naokichia 

Do you want to filter out items whose value of column 'PO Ship-...' is equal to 'Chaiwan - Hong Kong' and whose value of column 'Purch’s P...' is empty and then send them in an email?

What data type are your two columns in sharepoint?

vLilyWmsft_4-1638250123479.png

Assume I have a list like this.

vLilyWmsft_5-1638250312004.png

I set up a flow, you can take a try with the following screenshots.

vLilyWmsft_1-1638249513918.png

Add Filter array action and switch to advanced mode by clicking 'Edit in advanced mode'. 

@and(equals(item()?['POShip_x002d_route'], 'Chaiwan - Hong Kong'),equals(item()?['Purchs'], null))

Note: Where 'POShip_x002d_route' and 'Purchs' are the internal names of column 'PO Ship-route' and column 'Purch's' respectively.

vLilyWmsft_2-1638249538508.png

You can find column internal name via List settings -> Click on the column name -> It’s at the end of the URL on the Edit column page, after ‘Field=’.

vLilyWmsft_3-1638250023818.png

Add Select action and configure it.(The name placed in item() is the internal name of the column.)

vLilyWmsft_6-1638250560183.png

vLilyWmsft_7-1638250727896.png

vLilyWmsft_8-1638250749376.png

Save and test the flow.

After flow runs, items that meet the filter conditions will be filtered out and send an email.

vLilyWmsft_10-1638250943012.png

 

vLilyWmsft_9-1638250882675.png

Hope the content above may help you.

Best Regards

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,428)