To fix your Power Automate flow so that it sends emails only to the selected trainers based on the responses from your Microsoft Forms, you should ensure that the filtering logic in your flow is correctly set up. Here are some steps to troubleshoot and adjust your flow:
- Check Filter Array Logic: Ensure that your filter array actions are correctly configured. You should have two separate filter arrays, one for each trainer. Make sure that the filter query for each filter array is set to match the correct dynamic content from the form responses. For example:
- For Trainer #1:
trainer names (excel column of names from the table) is equal to dynamic response to Who was your trainer #1 - For Trainer #2:
trainer names (excel column of names from the table) is equal to dynamic response to Who was your trainer #2
- For Trainer #1:
- Use the Output of Filter Arrays: After filtering the arrays, ensure that you are using the output of these filter arrays in your "Send an Email" action. If you are currently using the entire list of trainers from the table, replace that with the filtered results from the respective filter arrays.
- For Each Action: In your "For Each" action, make sure you are iterating over the correct filtered array. If you want to send emails only to the trainers that match the responses, you should have two separate "For Each" actions, one for each filter array output.
- Testing: After making these adjustments, test your flow with different responses to ensure that it behaves as expected and only sends emails to the selected trainers.
By ensuring that the flow correctly filters the trainers based on the responses and uses the filtered results in the email action, you should be able to resolve the issue of emails being sent to everyone in the table.
References: