cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carterprine
Helper II
Helper II

Compare columns from 2 lists and find differences

Hello,

 

I have two lists (list A and list B) that each have an email address column. List A is the control list (has a directory of all email addresses listed once). List B contains form submissions associated to each email address. Each user may have multiple submissions or none on list B.

 

I would like to create a flow that checks which email addresses in list A have no submissions in list B, and send a single email notification to all of those addresses at one time. 

 

Is this possible?

 

Many thanks!

Carter

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @carterprine 

 

Steps to follow are:

 

1. Declare a variable array called "Emails"

1. Retrieve all List A emails.

2. Iterate each email and retrieve List B filter query by each email of List A

3. Check the count of the record.

4. If not found then append the variable array value using List A email.

5. Finally you have the array of emails.

6. Send email using the array values as single email.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @carterprine 

 

Steps to follow are:

 

1. Declare a variable array called "Emails"

1. Retrieve all List A emails.

2. Iterate each email and retrieve List B filter query by each email of List A

3. Check the count of the record.

4. If not found then append the variable array value using List A email.

5. Finally you have the array of emails.

6. Send email using the array values as single email.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hello @abm,

Thanks so much for your reply! This sounds like it will work well. I will give it a go and let you know how it works for me.

Cheers,

Carter

Hi @carterprine 

 

Thanks. If you need any further help please let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

This solution worked perfectly, thanks @abm!

 

I used append to array variables to add each list's email addresses to it's own array. Then I used a union expression in a compose, to eliminate any duplicate emails: 

union(variables('ResponseEmails'),variables('ResponseEmails'))

 

Then I initialized a third array variable for the 'missing addresses'. I added an "apply to each" for the outcome of the composed union. Inside of that, I have a condition which checks if the email addresses from List B are found in List A, and if not, emails each person to alert them that they need to provide their daily update. Additionally it adds the missing addresses to the third array, and emails a list of users who didn't provide their daily update to the supervisor.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,865)