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.

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 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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,102)