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.
@ScottShearer I am trying to do something like below before send an email action.
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?
@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.
If this answers your question, please mark your post as Solved.
If you like my solution, please give it a Thumbs Up.
Scott
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional