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 / Convert HTML for 'Join...
Power Apps
Unanswered

Convert HTML for 'Join - Teams Meeting' (in Outlook email body) into proper format

(0) ShareShare
ReportReport
Posted on by

 

Hello all,

 

I have a screen on my PowerApp that uses the OnVisible of a confirmation screen to update the Subject, Body, and other sections of an Outlook meeting. In the 'Body' portion of the code, I want say where the room has been moved to .. which is the following code:

 

"Room has been updated to " & RoomsGallery.Selected.Name

 

 

As well as (on a different line) the Body of the previous meeting in Outlook; which is the following code:

 

 

MeetingsGallery.Selected.Body

 

 

My code doesn't contain any errors and successfully patches information to the Body of the Outlook meeting, but the issue is that for the 'MeetingsGallery.Selected.Body' portion of code, it's all in HTML.

 

jharville_1-1630515276162.png

 

This is what the Body of my existing Outlook email looked like before the Patch (and how I want it to look like):

 

jharville_2-1630515448242.png

 

And this is what the Body of my meeting looks like after the Patch (my code in the app) has run:

 

jharville_3-1630515528707.png

^^ and if you scroll into the HTML, you'll see the Teams Meeting - Join link is embedded deep within it:

 

jharville_4-1630515626551.png

 

Does anybody know how I'd be able to convert the HTML that is generated from my 'MeetingsGallery.Selected.Body' code back into the format that it's supposed to be in?

 

Thank you!

Categories:
I have the same question (0)
  • Mx81 Profile Picture
    860 on at

    @jharville : how do you send the email? via the Office 365 Outlook connector?

    What formula do you use to send the mail? Office365Outook.sendMailV2()?

  • jharville Profile Picture
    on at

    @max81 

     

    Hi Max! Here is a screenshot of my code used in Outlook for the Body portion of code:

     

    jharville_0-1630523186354.png

     

  • Mx81 Profile Picture
    860 on at

    @jharville  : according to the documentation, this action is deprecated.

    Use this one: V4CalendarPatchItem

     

    Additional: I just read that this action uses the Graph API. Checking out the result from the Graph API, I think you must use this for your body:

     

    body:

    {
    "contentType": "html",
    "content": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><meta content=\"text/html; charset=us-ascii\"></head><body>New Product Regulations Strategy Online Touchpoint Meeting<div id=\"a59ada49-a492-4f1d-ac57-74be3a4194fc\" style=\"display:inline-block\"><table cellspacing=\"0\" style=\"table-layout:fixed; width:50px; border:0 none black\"><tbody><tr><td style=\"height:18px; padding:0; border-width:0 0 1px 0; border-style:none none solid none; border-color:#EAEAEA\">&nbsp;</td></tr></tbody></table><table cellspacing=\"0\" style=\"table-layout:fixed; width:90%; line-height:17px; border:0 none black\"><tbody>[...]</table></div></body></html>"
    }

     

  • jharville Profile Picture
    on at

     

    Hi @max81 ,

     

    I don't have much experience with Graph API's, would I need to use a connector for it? 


    I also changed my Office365Outlook.V2CalendarPatchItem() to Office365Outlook.V4CalendarPatchItem(), and added your code within the curly brackets {} to replace my code for the Body portion, and it errored out a lot. Would you be able to let me know what I'm doing wrong?

     

    jharville_0-1630603312795.png

     

     

    Thank you!

  • Mx81 Profile Picture
    860 on at

    The Graph API is used in the background of the Office 365 Outlook connector. So You don't have to to this 😉

     

     

    I tried it out by myself and it must look like this:

     

    Office365Outlook.V4CalendarPatchItem(
    ComboBox1.Selected.id,
    Gallery1.Selected.id,
    Gallery1.Selected.subject,
    Gallery1.Selected.start,
    Gallery1.Selected.end,
    Gallery1.Selected.timeZone,
    {
    body: "This is a <p style='color:black'>html</p> text"
    }
    )

     

     

     

     

    This worked fine for me. So maybe your html-body is just not  correct.

  • jharville Profile Picture
    on at

    @max81 

     

    I replaced my entire Office365Outlook.V2CalendarPatchItem() code with the Office365Outlook.V4CalendarPatchItem() code you attached, and it errored out completely.

     

    jharville_0-1630702154823.png

     

    This was my previous Office365Outlook.V2CalendarPatchItem() code:

     

    jharville_1-1630702180558.png

     

    In my code, you can see in the blue-highlighted sections that those are the 6 fields that need to be edited with new information. In my code, it worked (and there were no errors) but it put HTML in the Body when I wanted it to look like this:

    jharville_2-1630702502443.png

     

     

    Where in your code would I implement those 6 patches for those fields? And how would I adjust your code to match my format? 

     

    I appreciate your help, thank you so much.

  • Mx81 Profile Picture
    860 on at

    Just check your html. I think there must be some errors inside.

  • mappingman Profile Picture
    7 on at

    Hi jharville, did you ever find a solution for this issue? updating an existing invite using Office365Outlook.V4CalendarPatchItem() converts my invite to plain text and has all of the html tags around the original body text.

     

    Original Calendar Invite is originally an HTML styled message

    mappingman_0-1675865258112.png

    Body text is HTML

    mappingman_1-1675865316698.png

     

    The Code looks like this:

    Question01.PNG

     

    After the Power App updates the invite is converted to plain text and the body contains html tags

     

    mappingman_2-1675865467828.png

     

    mappingman_3-1675865492907.png

     

    Thanks for any insight that can be provided.

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard