I have been trying to create a flow which will allow me to notify users when a task date is due and to have all due task in a single email because they do not want to receive an email for every single due item on the list.
I have the vast majority of the flow working fine but I can't seem to get around the "apply to each" step. I only want a single HTML table and email to be sent out with a list of all records, but I seem to only be able to have multiple emails sent out (as the "send an email" step repeats on the "apply to each" step).
I have attached a picture of the flow. Is it possible to have a "create HTML table" and "send an email" step? I don't want multiple emails, just 1 with a list of records on.
If I move the "send an email" step outside of the "apply to each" my condition no longer applies so I just get a list of all (unfiltered) records.
Solved! Go to Solution.
Hi @bondy_07 ,
You could use array variables to store the data in the HTML table, and then use the variable as the data source that creates the Table.
Please refer to the image below to configure Flow.
Details of Apply to each:
Hope it helps.
Best Regards,
Hi @bondy_07
Rather than looping through items and then creating html table and sending emails
Use filter data operation and defined the same condition - this will return array of records matching the filter collection
Then you can create html table and send the email
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @bondy_07 ,
You could use array variables to store the data in the HTML table, and then use the variable as the data source that creates the Table.
Please refer to the image below to configure Flow.
Details of Apply to each:
Hope it helps.
Best Regards,
Hi @v-bacao-msft ,
Thank you for the reply.
When I create HTML with HtmlTable variable array, it show me this error:
The property 'columns' must be specified unless the 'from' property value is an array of objects.
Hi @bondy_07 ,
Could you provide screen shoot of Flow configuration?
Best Regards,
Hi @bondy_07 ,
Please follow the format in the screenshot provided by me to configure the Value, which needs to be a JSON object.
Best Regards,
Sorry,
I made this flow with "each for" providers and create a table with the orders (for each providers) :
Apply2 details :
The problem is : the initialisation is not setting. So, the HTMLTable become bigger and bigger...
How can I intialise my variable for each provider?
Your Solution is amazing. I had a question if there is a way we could format or beautify the html table we obtain in the email. The spacing is off and I wanted to add some Separators in between so.
Hi Reza,
I do have email column in the table and all rows shows same email id. And I want to send the table data to the email id which is in the table( removed email id column from table).How to achieve this?
Or, is it possible to send two arguments (1.DataCollection and 2.user email)? Right now I am sending just datacollection with below function.
EmailDetails.Run(JSON(GalleryDataCollection));
Thank you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
43 | |
18 | |
15 | |
14 | |
12 |
User | Count |
---|---|
77 | |
36 | |
29 | |
20 | |
19 |