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

Expiry notification sends multiple time

Hi 

i have a document library with field "ExpiryDate" and "StakeHolders" (People and groups with multiple selection enabled ) i want to sent emails notification if the expiry date is equal to 90 days to the stake holders field associated with the record.

i have managed that but multiple emails have been sent by the system.  How do i consolidate it into one?

 

Please see the flow below.

171.jpg

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @rinu007 ,

 

If you want the flow to only send one email, you could move the send an email action outside the Apply to each.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User
Dual Super User

It looks like the flow is sending one email per item.  If you have the same stakeholders for two documents then they will get two emails.  Are you saying that stakeholders are getting multiple emails for the same document or multiple emails for different documents?  To send out a single email with multiple documents in it you would have to figure out a way to parse the list multiple times and send one email for each matching set of stakeholders.  That is going to be very difficult to do.

 

An easier approach might be to start with a loop that builds an array of all the stakeholders.  Then a second loop that processes all the documents again one stakeholder at a time and sends an email for all the documents for that stakeholder.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks Pstork, 

"An easier approach might be to start with a loop that builds an array of all the stakeholders.  Then a second loop that processes all the documents again one stakeholder at a time and sends an email for all the documents for that stakeholder." 

 

I am pretty new to this Can you show me an example?

hi It is sending multiple emails for different documents

v-alzhan-msft
Community Support
Community Support

Hi @rinu007 ,

 

If you want the flow to only send one email, you could move the send an email action outside the Apply to each.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Top Solution Authors
Users online (5,722)