web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / send an email only if ...
Power Automate
Unanswered

send an email only if filter array has rows

(0) ShareShare
ReportReport
Posted on by

Hi

 

I have a long winded flow that has a branch after a select function, which then has 2 filter arrays to ultimately produce an email (or emails) for the result of the array.  ie we have some product returned and I need to send an email to one person if it's a credit, and an email to a different person if we need to order a replacement. Sometimes a person may return more than one product and a mix of replacement and credits within the return!!!

 

With the current flow, i am getting an email for both, regardless of whether there is a result in the filter array (just the email has no product listed).  I have tried a condition of equals null but no luck......    Any help greatly appreciated!

 

rowan_preston_0-1651552000636.png

 

 

Categories:
I have the same question (0)
  • shoog Profile Picture
    2,164 on at

    This would do the trick:

    empty(body('Filter_array'))

    equals false

  • rowan_preston Profile Picture
    on at

    Thanks for your suggestion.  Did I enter it in correctly?  It didn't work unfortunately....  The array that contained a result had no input from the condition and so terminated.  

     

    rowan_preston_0-1651637227355.pngrowan_preston_1-1651637241174.png

     

  • shoog Profile Picture
    2,164 on at

    @rowan_preston  My bad, the right part of the condition should be true (so when empty the flow terminates, if there is smth in the array send the email) in your case, I'm used to having the happy flow in the Yes part of conditions.

  • rowan_preston Profile Picture
    on at

    Hmmm this time i got cancelled for the left side, and the right side went to terminate.....

     

    But my left side filter array definitely has "body".  aarrrrgghh - I can't figure this out!!

     

    rowan_preston_0-1651700248063.png

    rowan_preston_1-1651700267066.png

    rowan_preston_2-1651700305460.png

     

     

  • shoog Profile Picture
    2,164 on at

    The 'true' in the right side of the comparisson should be entered in the expression editor to make it a real boolean, right now it's a text value.

    See below image for how I have this working in many of my flows. (use true in stead of false in your case). Make sure true shows up as a purple field to make sure the editor picked it up ok.

     

    shoog_0-1651730366104.png

     

  • rowan_preston Profile Picture
    on at

    I really appreciate your help.  I changed the expression, and it works when there is a null result, but it doesn't work for a false result - ie when there is body! Just still says no input and cancels the flow on that side.

     

    snip - credits not null not working.JPG

    rowan_preston_0-1651785864335.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard