cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dominion85
New Member

Conditionally add html text to email based on Microsoft Forms responses

Hi,

 

I have a flow that receives input from a Microsoft Form, creates an approval workflow, and then sends a custom approval email to the required parties:

 

Dominion85_1-1597087215152.png

Dominion85_2-1597087244774.png

Dominion85_3-1597087286435.png

 

In the approval email, an HTML table that contains the form questions and the form response variables is sent.

 

Dominion85_4-1597087416064.png

Dominion85_5-1597087489052.png

 

I would like to know how to only include specific text or rows in the approval email when the corresponding Forms question is answered. If the question is not answered, I would not like the question to show up in the email table.

 

For example if there are three questions in my form, and questions 1 and 3 are answered, but question 2 is not answered, I would like the email to only show the questions and responses for 1 and 3 in the table.

 

Please let me know if this makes sense or if you need more details or clarification of my question.

 

Any help would be GREATLY appreciated!

Thank you!

- Mike

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @Dominion85 ,

 

Sorry for I'm afraid that your requirement couldn't be easy achieved in Microsoft flow currently.

And the only way may be check all the question to see if the each question answer is null, then you could create different cases with different emails.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

4 REPLIES 4
ChristianAbata
Super User
Super User

hi @Dominion85  if the user don't fill the question in the space of email is going to appear empty. But you ca't hide the part of the html code in email if the user don't fill the question because as you know is HTML and is hardcoded. The only option you have is leave that option empty if ths user don't fill the question.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Thanks for your response Christian.

 

Is it possible to accomplish this by using a SharePoint list to automatically populate the email with the questions and answers; or is it possible if I use a document template to pull the text instead of HTML?

mmm could be the same result friend



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-alzhan-msft
Community Support
Community Support

Hi @Dominion85 ,

 

Sorry for I'm afraid that your requirement couldn't be easy achieved in Microsoft flow currently.

And the only way may be check all the question to see if the each question answer is null, then you could create different cases with different emails.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,367)