cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AAallday
Frequent Visitor

Sending email to assigned user in item only

Hello,

 

I have a list that tracks annual on-site visits. Each visit is assigned to a couple of people. The intent of the flow I created was to send a reminder email each month to users who have a past due site visit or one due before the end of the following month (i.e. on the 26th of each month I look for pending site visits that have a due date in the next 37 days).

 

When the flow ran this month, it pulled the right list of facilities, but with each new facility it kept the email of the previous recipient(s), so buy the end it emailed all the reminder to anyone who was in the assigned to column within that set of facilities.

 

for example:

FacilityUser (and only people reminder should go to)Reminder Email actually went to 
A

1 & 2

1 & 2

B31, 2 & 3
C4 & 51 - 5

 

So what i need is that each email recipient is established new for each list item.

 

 

Here is my flow -- I am super-novice and tried to piece together from other questions in the forum -- thanks in advance!

 
 

Snag_22db2001.png

Snag_22db65c5.png

Snag_22dba3c8.png

 

@DAllen365 (you were a big help on my last question -- hoping you can do it again!)

1 ACCEPTED SOLUTION

Accepted Solutions
DAllen365
Resolver II
Resolver II

Hey @AAallday, thanks for the outreach!  After reading over your issue, it appears that your issue is that it is continuing to append to the variable and is never reset during each foreach.  What I think you should try is to add a set variable action at the top (or very bottom) of each foreach loop where you set the variable to the expression null().  This will erase the variable so it only holds the values for that list item and should solve your issue.  Let us know!


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

View solution in original post

3 REPLIES 3
DAllen365
Resolver II
Resolver II

Hey @AAallday, thanks for the outreach!  After reading over your issue, it appears that your issue is that it is continuing to append to the variable and is never reset during each foreach.  What I think you should try is to add a set variable action at the top (or very bottom) of each foreach loop where you set the variable to the expression null().  This will erase the variable so it only holds the values for that list item and should solve your issue.  Let us know!


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

View solution in original post

Thanks again! 

Is this what you mean? 

AAallday_0-1615909984603.png

 

@AAallday Yes, I believe that should work.  I like to put it as the first action inside the foreach, but at the end should work too.  I actually just had to do again today to fix a looping issue.  Glad it was helpful!


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

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (48,146)