FLOW: Announce to the entire organization an employee's work anniversary.
It's about 90% complete; I can accurately filter and send an email to the individual but I need to send it to the entire organization using the same employee sharepoint list email field.
What I need to do is pass the individual's work anniversary information (name, years of service) to a secondary "apply to each" loop which will send the announcement to each person.
PROBLEM: I used an express item()?['xxxxxxxxx'] using fields from the filter array in the secondary "apply to each" loop; however, the flow is removing the "item()..." and putting the "get items" info instead.
Here are some screenshots of the flow:
The cause of your issue is that the secondary "apply to each" loop uses the value of the Get items output. For example, the Process_Status.. you used in the condition and First Name used in the email.
I think that to achieve your requirement, you don't have to use the secondary "apply to each" loop.
You could use items('Apply_to_each')?['Column'] directly to get the values and filter array.
I have made a test on my side, for the test, I just used Status for the first filter.
The flow works successfully as below:
Please feel free reply if you need more help.
Yes, this works for selecting a group of individuals via the filter array - the individuals who have been identified as having a work anniversary...
However, i want to send the message to the entire organization which is why i nested the Apply-to loop.
Thus, I identified 2 employees with a work anniversary, then sent a separate email to EVERY member of the organization.
Does that make sense?
Do you mean that you have employee's email field in the SP list, like this?
Maybe you could do like this, move Apply to each 2 to IF YES, don't know if this will meet your requirements.
Please take a try and feel free reply if you still have issue.
I don't think this is correct... I will restate the requirements:
1. Identify any and all employees who have a work anniversary using the hire_date field
2. Send an email to ALL employees in the list