Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

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


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:






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.




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




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



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




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!

Impactful Individual
Impactful Individual

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

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



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




Impactful Individual
Impactful Individual

@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:



"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>"



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?





Thank you!

Impactful Individual
Impactful Individual

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:


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.



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




This was my previous Office365Outlook.V2CalendarPatchItem() code:




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:




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.

Impactful Individual
Impactful Individual

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

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,535)