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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to Separate Answe...
Power Automate
Answered

Need to Separate Answers from Checkbox Form in Email Output

(0) ShareShare
ReportReport
Posted on by 14

I am trying to automate a forms-to-email process that includes the user's selection(s) to an answer via a check box, meaning it's multi-choice. I can send the email but the results come through strung together with a comma separating each answer. What do I do to get the answers separated by a line break, preferably with a bullet point? Thanks for any insight!

Categories:
I have the same question (1)
  • rzaneti Profile Picture
    4,263 Super User 2025 Season 2 on at

    Hi @randouser ,

     

    Yes, it is possible to format the answers from the MS Form before sending it by email.

     

    Could you please share the raw outputs from your 'Get response details' action, so we can see exactly how does it look in your end? You can follow the steps below to find the raw outputs:

     

    First, go to the 'flow details' page and click in one of the previous runs:

    rzaneti_0-1692221024060.png

     

     

    Once you do it, you will be in the 'flow run page', which may look like this:

    rzaneti_1-1692221023970.png

     

     

    Go to the 'Get response details' action and click in it to expand the details. Then click in "Show raw outputs" in the OUTPUT section. In some cases, this button appears as 'Click to download':

    rzaneti_2-1692221024025.png

     

     

    It will display a sidebar on the right side of your screen containing this JSON notation (if you had the 'click to download' option, it will open the outputs in a new tab):

    rzaneti_3-1692221024099.png

     

     

    Find the "body" property. It is always after the "headers" property. Inside the 'body' property, you will see some other properties with a weird name, and each one will match to an answer to each of your form's questions. Identify which one is related to your multiple choice question and share it (you can hide the actual value if it is sensitive; we just need to check how the Form is displaying it).

     

    Make sure to remove any sensitive content from the image before sharing. You also can find more details about how to access the outputs in Power Automate in this article that I wrote recently: http://digitalmill.net/2023/06/29/how-to-access-the-raw-outputs-in-power-automate/

     

    By the way, there is also this other article that, although it is not related to this specific topic, it works specifically with the use case of text formatting from MS Forms responses (it is in the section 'How to use expressions in Power Automate?'):http://digitalmill.net/2023/07/31/using-dynamic-content-in-power-automate/  

  • randouser Profile Picture
    14 on at

    Thanks for the response. I'll check out the article you wrote.

    Here is the code requested:

    "r32107ee0156c49e99e48f29641afa196": "[\"Answer 1\",\"Answer 2 \",\"Answer 3\"]",

     

  • rzaneti Profile Picture
    4,263 Super User 2025 Season 2 on at

     @randouser ,

     

    Thank you for sharing the outputs. Please, test this expression: 

    replace(replace(replace(replace(replace(variables('text'), '"', ''), '\', ''), '[', ''), ']', ''), ',', decodeUriComponent('%0A')), just replacing the red text by the dynamic content of your Form answer. 
     
    I ran some tests and got this output (highlighted in yellow) based in this input (highlighted in green):
    rzaneti_0-1692229155389.png

     

    For the bullets, you can use a variable like this (yes, with these weird characters):
     rzaneti_1-1692229453281.png

    The expression for this case is: 

    replace(replace(replace(replace(replace(variables('text'), '"', ''), '\', ''), '[', ''), ']', ''), ',', '</li><li>')

     

    These <li> and <ul> are HTML tags, and if I'm not wrong, the Outlook format the emails with HTML tags. I'm not able to test it at this moment with Outlook, but I tested with Teams and this was the output:

    rzaneti_2-1692229542827.png

     

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/ 

  • randouser Profile Picture
    14 on at

    I'm sorry. I know very little coding. Where do I put the code you want me to test?

    randouser_0-1692247313389.png

     

  • Verified answer
    rzaneti Profile Picture
    4,263 Super User 2025 Season 2 on at

    Hi @randouser ,

     

    Sorry for the incomplete explanation. Here are some steps about how to add the expressions in Power Automate.

     

    First, initialize a variable to store the formatted answer. You can do it directly in your Outlook action, but I recommend you to isolate this part of the process and then just add the variable to the email template.

     

    In any Power Automate action, when you click in the input field (highlighted in yellow), it usually will display a pop up with the 'Dynamic content' pane, like in the image below. In this 'Dynamic content' pane, there is a tab reserved for 'Expressions' (highlighted in green):

    rzaneti_0-1692270132878.png

     

    When clicking in the 'Expression' tab, you will see an 'Fx' input, where you may enter your expressions (highlighted in blue). These expressions are mostly very similar to an Excel Formula. After write your expression, click in 'Update'.

    rzaneti_1-1692270206291.png

     

    In the previous post, I told you to replace part of the expression for the dynamic content of your Form answer. For doing this, you just need to click in the position of the expression where you want to insert the dynamic content, navigate back to the 'Dynamic content' tab (highlighted in yellow), and select the content that you want from the list (marked in red). In your case, you will be able to see a lot of options of dynamic contents related to your MS Form trigger, so make sure to select that one related to the answer that you need.

    rzaneti_2-1692270370303.png

     

    After clicking in the dynamic content, it will automatically populate your expression with the reference to the property that you selected and you can click 'Update'. 

     

    In the bullets step, I also mentioned about the <li> and <ul> tags. Those are easier: you just need to type them in the variable value, letting the expression in the middle:

    rzaneti_3-1692270670981.png

     

    Your variable value will looks like: <ul><li>[expression_here]</li></ul>

     

    Let me know if it works for you! I can provide you with more instructions if needed.

  • randouser Profile Picture
    14 on at

    Thanks so much! That worked. I'm so happy. Thank you again!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard