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
Dual Super User
Dual 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
Dual Super User
Dual 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
Dual Super User
Dual 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

hatruongthai
New Member

Thank you very much! It works for me

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (3,487)