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
Solved! Go to Solution.
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.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @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.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHello @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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThis 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.
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
49 | |
46 | |
29 | |
25 |