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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create flow email from...
Power Apps
Answered

Create flow email from PowerApps that contains HTML text AND plain text

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have created a flow that sends an email to users the Power App (An IT ticketing system).  The email is regarding an IT ticket that is submitted or updated.  On the email flow, I have to set the "Is HTML" property to "Yes" because the email contains a HTML link that opens the ticket in PowerApps.  The email also contains a multi-line text label which contains the description of the issue.  

 

Because the email is sent as HTML (for the link to work), the description label formatting is messed up.  All the carriage returns are removed and the user is left with one giant paragraph of the description label.

 

I would like to be able to format the text label as HTML in order to preserve the paragraphs.

 

I am using the version of PowerApps that comes with Office 365 (not premium) using SharePoint lists as the data source. 

 

Does anyone have any ideas as to how I can accomplish this? 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    A couple of questions:

    1. Is Flow sending the email or PowerApps? If Flow, maybe the Power Automate community is the best spot to ask this Q

     

    2. If PowerApps

     - are you using a HTML text input for your description label? Silly question, but I had to ask

     - could you post some images of your email code & any images you think maybe relevant?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Eelman,

     

    I was trying to do this using Flow so I will repost in the Power Automate community.

     

    With that being said, I did not realize you could send an email directly from PowerApps by linking the Outlook connector.  I may explore this as an alternative.  I do need to be able to include attachments and be able to change the "From" field, however if that is possible then this may work better than Flow.  

     

    Many Thanks,

    Martin

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    Apologies for the late reply.

     

    Yes, you can change the various parameters in the SendEmail function and also send attachments. Here's the code for an email I send with attachments. 

    Office365.SendEmailV2(
     // colReportEmailList is a collection built by users which could have 1 to many 
     // recipients
     // Concat splits the emails into separate email addresses
     Mid(Concat(colReportEmailList, "," & Email), 2, 1000),
    
     // varLoggedInCamp is a site name, some relevant text
     // and Date to Text to make the email header
     varLoggedInCamp & " Daily Docket for " & Text( dpReportDate.SelectedDate,"[$-en- 
     US]dd/mm/yyyy"),
     
     // this is the HTML blob that is the email body, it's in a html table format (see pic)
     HTMLDailyDocketEmail.HtmlText,
     
     // this is the attachment added
     {Attachments:Table({Name:First(DataCardValue44.Attachments).Name, 
     ContentBytes:First(DataCardValue44.Attachments).Value, '@odata.type':""})}))

    Note: I've cut down the above code to the basics to show how you could do this. The Mid(Concat(... formula I got from the forums at some point, so not mine, but it works.

     

    This is a pic of the output - note this particular email (ie SP list item) doesn't have an attachment but it would be there if it did:

     

    Email_plus_attachments.jpg

     

    It really depends what you want/need. Flow could do what you want if you use PowerApps to populate your data source ... or ... you can do something similar to the above? I use both, but just try and pick the one with the least amount of work 🙂

     

    Cheers

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I finally fixed this by creating another text label and reformatting the original text label to replace new lines (Char10) with the HTML line breaks using the Substitute function...

    Substitute( DataCardValue3.Text, Char(10), "<br>") 

    This second label is hidden on the form and is just used with the Flow email.  Start and end paragraph tags are not required.  The resultant text looks like this:

    Test line 1<br><br>Test Line 2<br><br>Test Line 3

    And the email looks like this:

    Test Line 1
    
    Test Line 2
    
    Test Line 3

    It seems that when you put html tags into a plain text label and send via a HTML flow email, the tags are processed.  I will also be able to use this to style the text however I want it.  Was a nice surprise that this actually worked!

     

    Thanks again for your ideas.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard