Hello,
Of course! Here is a quick demo on how to capture the data from a SharePoint List based on a few conditions (status, compliant type and received older than 49 days) and send an email for each of them.
For this example, I'm working with the following SP List, and will filter it by status = Open, CompliantType = Order and ReceivedAt older than 49 days:
I'm using a manual trigger, but the logic is the same if you set up a scheduled flow. Right after the trigger, you must use a Get items action to retrieve the records from your SP List, and filter it accordingly in the Filter Query field (highlighted in green). As you can see below, for Status and CompliantType, which are both choice type columns, I'm simply writing their name, using the eq operator (which corresponds to "equals to") and passing the desired choice labels between single quotes (respectively 'Open' and 'Order). For ReceivedAt, which is a date type column, I'm passing its name, the lt operator (which corresponds to "lower than") and using the expression addDays(utcNow(), -49) to determine the date to be used in the filter (49 days before today), as highlighted in red:
You may also notice that the three conditions are separated by and statements (highlighted in yellow). Make sure to also enclose the addDays() expression between single quotes in the Filter Query.
At this point, Power Automate is retrieving only 2 records from the List (Poor packing and Missing items) in an array format, since those are the only ones that match the 3 filters that we've set. We now need to iterate this array and send an email to the manager for each of them. To achieve it, you need to add an Apply to each action and pass the dynamic content of value property from Get items action as input, like highlighted below. Within your Apply to each, add a Send an email action (in my case, I'm using a slightly different action, since the email will be sent from a shared mailbox rather than an individual one) and populate it as you wish:
Both in the email subject line and body you can combine static texts with dynamic contents, just like I did for the "Title" and "Description" of the complaints. You can also insert expressions within these inputs if needed.
After saving an testing it, the flow runs successfully and the Apply to each identifies only 2 records for iteration:
And the "Manager" receives one email for each of the List records that match the filter criteria:
Additional content
I'm also sharing a few resources related to the topics discussed in this solution, which can be helpful for you or any users that find this thread in the future.
Let me know if it works for you or if you need any additional help!
-------------------------------------------------------------------------
If this is the answer for your question, please mark the post as Accepted Answer.
If this answer helps you in any way, please give it a like.
http://digitalmill.net/
https://www.linkedin.com/in/raphael-haus-zaneti/