cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sahara22
Post Patron
Post Patron

Compare two sharpoint lists and send email

Hello,

 

I have trying to get this done for hours now and hope someone can help me. Basically I have two Sharepoint lists. I need to make a condition that If both lists have the same email address I want to add it to an email and send it. I want it sent all together in a list in one email using the HTML table format. 

 

Here is what I got so far, it either loops for forever or I don't get anything at all.

Screen Shot 2022-10-07 at 5.38.29 PM.png

 

Thank you so much!  

2 REPLIES 2
Sahara22
Post Patron
Post Patron

Any Idea's Please?

takolota
Super User
Super User

You may be able to avoid loops entirely for this.


You can use two Selects & switch them to the non-table textbox view with the right-side button on the action. Put the values dynamic content from each Get items for each list in them. Then just insert the email value in the textboxes with something like

Item()['Email']


From there you can use a Filter array action with the Body from say List1-Select in the From field. Then on the left side of the condition put the Body from List2-Select. Set the condition to Contains. Then put the same 

Item()['Email']

 into the right side of the conditional.

 

This should now search the array of emails from List 2 for each email from the array of List 1 and return all the emails in List 1 found in List 2.

 

You can then insert the Body of that Filter array directly into the HTML Table action.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,096)