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 / Crafting a dynamic ema...
Power Automate
Answered

Crafting a dynamic email message (body) content.

(0) ShareShare
ReportReport
Posted on by 8

I have a large MS form that has multiple Y/N questions (40+) with a comment (long text) response required if "Y" is selected for the preceding Y/N question.  I'm using branching on the MS form to require the comments.   

 

My question is how do I craft an email response with the body of the email only displaying the questions/comments where the question boolean is "Y", skipping any questions that are answered

 

 

Categories:
I have the same question (0)
  • Verified answer
    365-Assist Profile Picture
    2,324 Moderator on at

    I suggest using an Array variable to store the comments then add the Array to your email. Something like this:

    365Assist_1-1657675812448.png

    365Assist_2-1657675834531.png

    You may have to format your string to make it look the way in your email.

     

    --------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

     

  • dougowens Profile Picture
    8 on at

    Ok so I've successfully created my array and am appending three separate sets of answers to it.   

     

    The flow looks like...

    dougowens_0-1657910471872.png

     

    The hard thing for me to figure out is how to format the output of the variable, whether or not I have one or all three conditions are met.  

     

    The output when I have all three conditions met, looks like...

     

    [

         "Complaint,07/15/2022,,concerns / issues / observations",

          "Complaint,07/12/2022,07/15/2022,concerns / issues / observations",

          "Both Annual & Complaint,,,concerns / issues / observations"

    ]

     

    How do I format to put in an email body to look something like this...

     

    • Survey Type: (first field of the first line of my array)
    • Entry Date: (second field of the first line of my array)
    • Exit Date: (third field of the first line of my array)
    • Survey comments: (fourth field of the first line of my array)

    Repeat for all lines of the array. 

     

    Thanks in advance for any assistance. 

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