Hi Levi,
Sure thing. I did try your setting variable and clearing it with a null value but because of the concurrency of the Email with Options step it wasn't working.
We have a "Missed Call Log" SharePoint list that our administration staff fill in manually, including details such as:
- Phone Call For (staff members name, can be multiple staff members)
- Caller (name of the person on the phone)
- Call Returned (default set to No)
On creation of a new list item, a Power Automate flow runs, sending out an "email with options" (If the option in the email is clicked, sets "Call Returned" field to Yes, preventing the second flow from running) to all staff in the "Phone Call For" field.
This step is working perfectly. No issues here.
The problem is with the second Power Automate flow i'm running.
This second flow is a Reminder email, triggered using a Recurrence, happening at 8 am every weekday.
Any item that still has "Call Returned" set to No, this flow is meant to send an "Email with Options" to all staff for each item, to return their missed call.
Separate email for each missed call item.
For example:
Missed call #1 has 3 staff members listed.
Missed call #2 has 1 staff member listed.
Missed call #3 has 2 staff members listed.
At 8 am this reminder flow needs to send out 3 emails.
The first email combines the 3 staff members emails from call 1 into a string, each separated by a semicolon ;
The second email doesn't need to combine, so it just sends it
The third email combines the 2 staff members emails from call 3 into a string, separated by a semicolon ;
How I currently have it set is:
Flow triggered at 8am on a weekday >
Get items (with Filter Query set to: Phonecallreturned eq 'No' ) >
Initialize Array Variable. This will be populated later to combine each staff members email (EmailArray) >
Apply to each item with Phone Call Returned = No > (NOTE: Concurrency is enabled)
| Apply to each staff member in the item (Phone call for) > (NOTE: Concurrency is enabled)
| Get user profile (gets their email) >
| Append to array variable (EmailArray) >
| Join array with ; >
| Send "Email with Options": The "To" field is the Join output >
| Switch step for the "Email with Options" response (SelectedOption).
| Update Item > Set Phone Call Returned to Yes
The issue i'm having is it's combining staff from multiple items.
In the first image below, for item "Test 4th input", it emailed 5 recipients.
But the SharePoint list only has 2, as shown in the 2nd image.
1st image

2nd image

I need the concurrency to send the email with options, otherwise they get stuck withing for a response from the first person before the second email goes out.
But the concurrency is causing it to join all of the reminder recipients together I think.
These are the 3 SP list items i'm testing with.
5 total recipients over 3 different items.

I don't know the best way to make this work.
Hopefully this makes sense.