cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

HTML Table Flow Emails

I am trying to build a flow that sends a summary table daily of the items needing action based on a yes/no value in various columns. However, I am having two issues. 1. While the email is triggering daily, it is sending multiple emails based on the number of values in the table. For example, if there are two entries on the Sharepoint list, then two emails are sent both with the same information. 2. The yes/no value check appears to not be working. For example, I need emails to send based on current yes/no state of multiple "approval" columns (no approval process is needed). However, currently an email is being sent with all entries regardless of their approval statuses.
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous,

 

Do you want to extract the values of the multiple selection field and display them in text in the Html table?

You may need to use two variables to achieve this.

I have tested on my side, you could implement your requirements as follows.

1. Initialize two variables, the type is String and Array, the former is used to store the value of the multiple selection field, the latter is used to configure the data in the Html table.

6.PNG

2.Use Append to string variable action to store the value of Rebate Type field contained in each item.

  Then configure the fields that need to be displayed in the Html table in Append to array variable action.

  After each item is traversed, need to empty the String variable.

7.PNG

3.Finally, the Array variable is configured in Create HTML table action and sent as the body of the message.

8.PNG

Flow works well:

9.PNG

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

15 REPLIES 15
Anonymous
Not applicable

I have a screenshot, but I cannot seem to add photos or attachments.
v-bacao-msft
Community Support
Community Support

Hi @Anonymous,

 

I hope to see a specific screenshot of the Flow you configured.

You could try uploading your screenshots using other browsers such as IE or edge.

In addition, If you want to include all the relevant items related information in an email, you could configure Filter array action, filter the eligible items, and then configure the Value in Create Html table action.

I create a column named approval, of type Yes/No, and judge whether the value of approval is "true" in the Filter array. Here you need to use true/false instead of Yes/No.

Use Recurrence as the trigger and set Flow to fire only once a day.

Image reference:

5.PNG6.PNG

Take a try or provide more details about your Flow configuration, we would provide proper workaround for you.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Barry,

 

See below. I had already used these steps, but it is still triggering multiple emails.

 

Rebate-Approval-Flow

Hi @Anonymous,

 

Do you mean that the email of the "Sales Manager Email" branch is sent repeatedly?

That is because you have configured "Send an Email action" in Apply_to_each, so every time traverse an item, it will send an email.

So first you can't configure the send email action in Apply_to_each.

In addition, I want to know if the contents of the emails sent in these branches are the same? Even if it is sent to the same person, if it is, it may be the reason for receiving multiple emails.

Because the actions in the parallel branches are not executed sequentially, please make sure not to set duplicate actions.

Try adjusting your Flow to check if the issue still exists.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I adjusted my flow to be sequential instead of parallel with condition checks, and now it works. However, when the email sends, I cannot get "Rebate Type" to display as text - this is a multiple selection field from Sharepoint. I tried adding "Initialize Variable" and "Append to String Variable" to get the value, but it still is not working.

 

Rebate Approval 2.JPG

 

Rebate Rmail.JPG

 

 

 

Hi @Anonymous,

 

Do you want to extract the values of the multiple selection field and display them in text in the Html table?

You may need to use two variables to achieve this.

I have tested on my side, you could implement your requirements as follows.

1. Initialize two variables, the type is String and Array, the former is used to store the value of the multiple selection field, the latter is used to configure the data in the Html table.

6.PNG

2.Use Append to string variable action to store the value of Rebate Type field contained in each item.

  Then configure the fields that need to be displayed in the Html table in Append to array variable action.

  After each item is traversed, need to empty the String variable.

7.PNG

3.Finally, the Array variable is configured in Create HTML table action and sent as the body of the message.

8.PNG

Flow works well:

9.PNG

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

We are close. I was able to get the table created. Now, however, the values in the table are not checking the condition of the responses. For example, I only want to send "Sales Admin Reviewed" false in one email, the next "Sales Admin  Reviewed" true and "Sales Manager Reviewed" false, etc. See screenshots.

 

Rebate Approval 3.JPGRebate Approval 4.JPGRebate Approval 5.JPGRebate Email 1.JPG

Hi @Anonymous,

 

If you want to send emails under these conditions, I suggest you create multiple similar Flows.

The ones that need to be changed are to get the eligible items.

If the types of these fields you are talking about are single-line text types or types that can be used in Filter Query, you could configure them to use Filter Query to get eligible items:

Note: If there is a space in the middle of the field name, you need to use "_x0020_" instead of a space.

3.PNG

If they are not a single-line text type or a type that cannot be used in Filter Query, then you can't configure Filter Query.

You could use Filter array to filter the value of Get items action output, and then configure the value of Filter query output in the following action.

Because you can't use the Dynamic content output by Get items, you need to configure the Expression yourself to get the data.

Like:

1.PNG2.PNG

Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

The filter query seems to be working, however when I try to have it look up multiple variables using the "and" condition, I get an error that the expression is invalid.

 

Rebate Approval 6.JPG

Hi @Anonymous,

 

I did a test on my side and met the problem you said, but it seems that it can't filter out the correct items.

You could consider using the Filter array mentioned in my previous Post.

Configure the following conditions in the Filter array:

@and(equals(item()?['Sales_x0020_Admin_x0020_Reviewed'], true),equals(item()?['Sales_x0020_Manager_x0020_Review'], false))

Image reference:

4.PNG

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

It seems like every time we fix one thing, another breaks. I added in the array as sugsted. Now the condition is not working and the emails stopped displaying correctly. HELP!

 

Rebate Approval 7.JPGRebate Approval 8.JPGRebate Approval 9.JPGRebate Approval 10.JPG

Anonymous
Not applicable

Barry - Following up as this did not solve the problem.

Hi @Anonymous,

 

First of all, your email display is not normal, probably because the "Is html" field in Send an email action is not set to Yes.

In addition, if you use Filter array, then the value used in Apply_to_each should be the value of Filter array output.

You can understand that Filter array is equivalent to filtering the output of Get items, then we configure the following action, it has nothing to do with Get items action.

So when replacing the Dynamic content output from Get items before the replacement, you need to use the items(‘Apply_to_each’)[‘ColumnName’] to get the field value.

You should combine several of my previous posts and you will find the workaround.

I have already tested on my side and that can achieve your needs. Please be patient.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I do not understand what you mean by: "

So when replacing the Dynamic content output from Get items before the replacement, you need to use the items(‘Apply_to_each’)[‘ColumnName’] to get the field value."

Hello Barry @v-bacao-msft  !

Thanks to you and your solution, I just avoided some headaches !

 

I just can't figure out how to add a real clickable link :

 

htmlvar05.PNG

htmlvar02.PNG

Here is the email sent : I would like the link to be a real clickable link. But apparently Flow does not recognize it as a valid HTML ?

htmlvar06.PNG

 

 

 

Thanks for your help !

Gaëlle

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,141)