cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hatruongthai
New Member

How to modify the custom body

I am creating an automate with the flow below, to remind me via MS team whenever any events in Outlook calendar are about to start.

 

power.PNG

 

However the result was very messy. The subject looks good, but the body looks like a html code.

 

body html.PNG

 

Can someone help me how to fix this? Or any suggestion for me to post a message when the upcoming event is starting in Outlook calendar?

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @hatruongthai,

 

You could for instance use an expression with a couple of replace functions for that.

 

Below is a sample for that which you can paste into the expression editor.

replace(replace(outputs('Html_to_text')?['body'], '\r', ''), '\n', '')

 

replace_functions.png

View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @hatruongthai,

 

You could use a HTML to text action to convert to body into text.

 

htmltotext_action.png

 

After that you can use the plaintextcontent field in your post a message action.

 

theplaintextcontent.png

@Expiscornovus thank you for your advice! Below is my result after following your suggestion.

 

test.PNG

 

It looks much better, however is there any way to completely remove the "\r\n \r\n ...... \r\n" ???

Expiscornovus
Super User
Super User

Hi @hatruongthai,

 

You could for instance use an expression with a couple of replace functions for that.

 

Below is a sample for that which you can paste into the expression editor.

replace(replace(outputs('Html_to_text')?['body'], '\r', ''), '\n', '')

 

replace_functions.png

View solution in original post

hatruongthai
New Member

Thank you very much! It works for me

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (1,677)