cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WorkHard
Advocate II
Advocate II

Trick to only send an email once when the workflow of the automation would send multiple

I have a flow that decides which user needs to be notified based on two Comboboxes plus one permanent user that's always notified, no matter the selection.
The flow is used in a Power App connected to a SharePoint list.

So for example:


First Combobox: (hard coded in the flow, always the same person)
If the weather is Sunny > Notify Person 1 

If the weather is Cloudy > Notify Person 2

Second Combobox: (hard coded in the flow, always the same person)
If the Region is USA > Notify Person 3
If the Region is not USA > Notify Person 4

Finally, always notify whoever is entered in a Person field. (Could be a different person or Person 1-4).

My flow looks like this:

WorkHard_0-1625756269736.png


What's the best way to prevent sending a duplicate email if the person that always needs to be notified is already one of the Person 1-4?

 

P.S: My real-world scenario is much more complicated than this. This is a simple example to illustrate the question I have.

1 ACCEPTED SOLUTION

Accepted Solutions
iAm_ManCat
Super User
Super User

Hi!

 

I would append the email addresses of the people to a string variable, that way you can use a condition block to check for if ThisPersonsEmail exists in StringVariableName, if yes then do nothing, if no then append their email to the string, then use that string variable in the To field when sending the email.

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

2 REPLIES 2
iAm_ManCat
Super User
Super User

Hi!

 

I would append the email addresses of the people to a string variable, that way you can use a condition block to check for if ThisPersonsEmail exists in StringVariableName, if yes then do nothing, if no then append their email to the string, then use that string variable in the To field when sending the email.

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Thanks. Except I wouldn't use the string in the To field because the outcome of each switch condition decides which person is notified.

So I have to collect the email addresses of everyone and then at the end check the string if the person at the end exists in the string or not.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,886)