Dec 09 2022 11:47 AM
I have a SharePoint list for tracking different project tasks. I want to create recurring flow to send a weekly email to the project coordinator (which is a list column) displaying the statuses of each of their standard tasks (each task is a list column).
I'm using the template in PowerAutomate but when I go the "Send an email (v2)" module and I'm crafting the body of the email with the dynamic content, the box keeps replicating itself with nested "apply to each" scripts when I add more fields in the email body. When I test the flow, it fails, and I think it's because of this forced "nesting".
Dec 10 2022 02:45 AM
@jeffreyhaddad1 if you follow the get items immediately with an action like send an email it will always wrap itself in an apply to each. But we can overcome that with a select action. the following is from one of our live flows that produces a list at 7pm every night for each of our office managers.
So immediately after the get items add a select action and in the from field select value from the dynamic content box. Then add the column headers you want and select the dynamic content you need:
Next, add a create html table and in the From field select the output from the select action.
To make the table look better than the default add a compose action and paste in the following html (which of course you can change to whatever you want).
And at the bottom of the Input field select the output of the create html table action.
Finally, add your email action and add the output from the compose action above.
And this is the result.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Dec 13 2022 09:37 AM