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 / How to skip send email...
Power Automate
Unanswered

How to skip send email if output from different compose actions are empty

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a flow setup as shown in below screenshots. Its working without any issues.

Its a very simple flow with 3 get items, 3 filter array, 3 compose, 3 create html table actions and then send an email out.

 

In the send email body, ishtml is set to YES and I am using custom html to format the content displayed.

 

as shown in last screenshot, outputs from all three compose actions are included in the email body.

One concern I have is, if all 3 compose outputs are empty, it still sends an empty email with custom html text which is but obvious by the current design I created.

 

Is there a way to skip send email only if all 3 compose outputs are empty, maybe a simple condition statment works? Not sure, please share info, thanks in advance. 

 

P.S: I Only want to execute send an email task if either of the compose ouputs contain value.

flow1.JPGflow2.JPGflow3.JPG

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @Anonymous :

    I would approach your requirement a little differently. 

    First, I would not use the compose and filter array statements.  Rather, I would use an OData filter on each of the Get Items actions.  That way, only the items you need are returned and there is no need to filter further.

     

    To find out if any records were returned, I create an array form the items returned for the Get Items actions and check the length of each one.  Then, you can use a condition to see if you want to send an email.

     

    The screen shots below demonstrate the concept of creating the array and checking the length.  The variable I declare is an array.

    If you need additonal help, let me know.

     

    RecordsReturned.jpgRecordsReturned1.jpg

     

    If this answers your question, please mark your post as Solved.

    If you like my solution, please give it a Thumbs Up.

     

    Scott

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Thanks Scott, appreciate the help. I am using odata filter query in my get items and filter array is used for a specific reason. I have to use compose to replace the create html table with a table. There will situations where none of the get items would return anything, that is when I want to skip send email action. Can I use condition for compose output something like not equal to empty?

    I am not really concerned about create html action, rather send an email action. Only and only if one of the compose output returns data then email should be sent otherwise skipped.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @ScottShearer I am trying to do something like below before send an email action.

    Capture.PNG

    If all 3 outputs are empty then it returns false but when at least one of them is non-empty then also it returns false, how to use this condition here?

    Bassically if all 3 are empty then false should be returned but if alt least one is non-empty then true must be returned in which I can attach send an email action, any thoughts how to make it work?

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard