cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YaBooyyy
Frequent Visitor

Body of email showing HTML enters in description

Hey all,

I'm making a power automate.
The automate is about assigning an email to someone and making a task in planner about this.
Everything is working exactly like I would want it to only the body of the email.
I converted the HTML to normal text but is still show some elements.( /r/n )
I added some pictures of the part from my flow wich has an impact on this.
I also tried to add a delay between create and update task but this didn't help 😞

add body to description.PNG

convert html.PNG

  

Html elements.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Sundeep_Malik
Community Champion
Community Champion

@YaBooyyy 

So replace function, replaces any word or letter that you give with another letter/word you provide.

So, in the above case, you can use it like this:

take a compose:

replace(variables('EmailText'),'\r','')

By this we are replacing \r with no space.

Then you can do this again for '\n'

This can be done in 1 compose too, but I am really bad with expressions. Hehe.

View solution in original post

7 REPLIES 7
Sundeep_Malik
Community Champion
Community Champion

Hey @YaBooyyy 

Can you give an example or test data how your data looks like in the body that you are entering in html to text action?

Then I might be able to give you some solution.

Hardesh15
Super User
Super User

@YaBooyyy  If you want to remove new lines code please use replace() before assigning to variable.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

body example.PNG

Hey I added a screenshot of the body.
It is a test mail I made to test is the subject and start date and sutch works.

Hey,
I have never heard of the replace operation.
Wich one should I use and why?
Thnx in advance 🙂 

Sundeep_Malik
Community Champion
Community Champion

@YaBooyyy 

So replace function, replaces any word or letter that you give with another letter/word you provide.

So, in the above case, you can use it like this:

take a compose:

replace(variables('EmailText'),'\r','')

By this we are replacing \r with no space.

Then you can do this again for '\n'

This can be done in 1 compose too, but I am really bad with expressions. Hehe.

Sundeep_Malik
Community Champion
Community Champion

@YaBooyyy 

Use this:

replace(replace(variables('EmailText'),'\r',''),'\n','')

 

Hey I testes with compose a both but I still have the same result.
The replace is as follows: replace(variables('EmailText'),'\r','')
I added a screenshot of the part from my flow, still using the same email as a test
I looked around on other post and looks like they do the same.
Thnx again for the fast answer 🙂

Flow with compose.PNG

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,783)