cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ersula82
Helper III
Helper III

Flow sending empty excel table

 

As a beginner, I created a flow to:

 

1. Collect the items in an excel table

2. Convert the table into an HTML table format

3. Email the table with options to a user

4. Add the table items in to another excel table (for tracking)

5. Delete the items off the original table so the flow will not resend the same names the next day

 

The flow is working, aside from a few ugly formatting issues that I won't mention here.

 

The problem I am having is that the flow is still sending the email even though the table is completely empty. So, the user sees the email but nothing is in it.

 

PLEASE HELP! Also, I am a beginner so please help me by simplifying terminology so I can understand.

 

Untitled3.PNG

 

 

Untitled.pngUntitled2.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @ersula82,

 

Do you not want to send an email to the user when the HTML table is empty?

 

If you don't want to send an email to the user when the HTML table is empty, I think the @empty function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

  • Add a Recurrence trigger, Interval set to 1 and Frequency set to Day.
  • Add a "List rows present in a table" action, specify Location, Document Library, File and Table field.
  • Add a "Filter array" action.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Filter_array'))

Within "If/yes" branch of Condition, do nothing. Within "If/no" branch of Condition, add a "Create HTML table" action, From set to output of the "Filter array" action. Then add a "Send email with options" action, Body field set to output of the "Create HTML table" action, Use only HTML message field set to Yes.

 

Image reference:18.JPG

 

19.JPG

If the output of the "Filter array" action is empty (If the output of the "Filter array" action is empty, the HTML table would be empty), the flow works successfully as below:20.JPG

 

 

On your side, you should add a Condition action under the "Filter array" action of your flow to check if the output of the "Filter array" action is empty, if the output of the "Filter array" action is empty, do nothing. If the output of the "Filter array" action is not empty, send an email with options to the user.

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @ersula82,

 

Do you not want to send an email to the user when the HTML table is empty?

 

If you don't want to send an email to the user when the HTML table is empty, I think the @empty function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

  • Add a Recurrence trigger, Interval set to 1 and Frequency set to Day.
  • Add a "List rows present in a table" action, specify Location, Document Library, File and Table field.
  • Add a "Filter array" action.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Filter_array'))

Within "If/yes" branch of Condition, do nothing. Within "If/no" branch of Condition, add a "Create HTML table" action, From set to output of the "Filter array" action. Then add a "Send email with options" action, Body field set to output of the "Create HTML table" action, Use only HTML message field set to Yes.

 

Image reference:18.JPG

 

19.JPG

If the output of the "Filter array" action is empty (If the output of the "Filter array" action is empty, the HTML table would be empty), the flow works successfully as below:20.JPG

 

 

On your side, you should add a Condition action under the "Filter array" action of your flow to check if the output of the "Filter array" action is empty, if the output of the "Filter array" action is empty, do nothing. If the output of the "Filter array" action is not empty, send an email with options to the user.

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Thank you soooo much Kris, it works! I would say the only thing I saw different was the "Use only HTML message field set to Yes". I don't have that feature inside of the 'email with options' window.

 

My 'email with options' looks exactly like yours EXCEPT the "use only HTML message".

 

Should I have that feature?

 

Ersula

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,925)