Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Filter Questions/Responses then Email

Hi Flow Community,


I have a Form set up that goes through a series of questions, getting responses that are either "Yes", or an input from whoever is filling it out.  This currently links to a Flow that takes all the responses and sends out an email that follows this format:


Has the xyz been done?  [Response: Has the xyz been done]


So the email is a combination of text outlining the question, then whatever the response was from whoever submitted the form.


What I'd like to do is filter out all of the "Yes" responses, and only send emails when a response has been typed in by the submitter.  


I can't work out how to do this though, each Form has 20-30 questions, and it seems like a terrible idea to use 20-30 conditional statements in a row.  The second part of the problem is that I will need to include the relevant question which, at the moment, is typed into the Send an Email block body.  Any ideas?  


Thanks in advance,

Solution Sage
Solution Sage

Hi @IanS 

You could use a single Condition action to check that at least one of the responses is not Yes and therefore an email needs to be sent.

Then, either direct in the email body or in a Compose action (which you can use the Output of in the body), you can create an expression similar to the below for each question (where triggerBody()['questioninput'] is the question response)


if(equals(triggerBody()['questioninput'],'Yes'),'',concat('<br>For this question you said: ',triggerBody()['questioninput']))
This will only display the text and response if the value of the response is not equal to 'Yes'. You should end up with multiple expressions in your Compose action.
If you then make sure that your email is marked as being HTML then the line break tags that are used in the expressions will function as expected.

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,832)