cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ersula82
Level: Powered On

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
Community Support Team
Community Support Team

Re: Flow sending empty excel table

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
Community Support Team
Community Support Team

Re: Flow sending empty excel table

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

ersula82
Level: Powered On

Re: Flow sending empty excel table

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,042)