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

Line Break in Html_to_text / Converting E-Mail to Planner Task

Hi all...

I  am quite new to MS Automate and have a problem which I can't solve, yet. Perhaps someone can give me a hand on it. I also searched the web and this forum but did not find a solution for it... just hints for a direction to look at.

 

The circumstance is as follows: I need to create a task in MS Planner from an E-Mail. The mail has a certain format, arrives in Outlook, gets moved to a specific folder in Outlook, the flow is being triggered when a new mail arrives in the specific folder. I am using a template for it and it does work fine, except for the formating in the task description. Every line break ist being removed, so that the whole text is one flow. I test-run the flow and checked the input and output data. At the Input I get a couple of "\n" shown, some are either being removed or inserted by the "Html _to_text" conversion.

 

This is how the flow looks like:

 

Markus__0-1601228163658.png

This is what I get at a test run, the output has no line break.

Markus__1-1601228612869.png

The input has a couple of "\n" as you can see here at the content string.

 

Markus__2-1601228742409.png

The output has removed the originals "\n" as you can see at the body string.

 

Markus__3-1601229014720.png

Here is the whole converted body string which gets used as task description, you can see the inserted "\n".

 

"body": "(DM) 15510589 / (TID) DE_95020-39675193 ATM XXXXXXXXX (DB) GAA_61048\nFreiheitsstr. XXXXXXXXX Nordrhein-Westfalen XXXXX FIrmenname: XXXXXXXXXX\nDeutschland GmbH Geräte Hersteller: NCR Modelnummer: NCR Persona S71\nSeriennummer: XXXXXXXX Vorgang vom: 27-09-2020 18:01 Problem: Testmeldung, keine\nechte Störmeldung!!! Kommentare:"

 

Here is the result in MS Planner

Markus__4-1601229477027.png

 

This is how it should look like

Markus__5-1601229694498.png

I found some people working with a function called "replace" the replace certain characters but did not get it to work for me.

 

Can anyone give some advice? 

 

Thank you.

 

Markus

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Markus_,

 

You could initialize a string variable named BreakLine, then input twice Enter button into the value(or once), then use replace() function repalce these "\n" to the variable BreakLine, for example:

replace(outputs('Compose_2'),'\n',variables('BreakLine'))

Screenshot 2020-09-28 143308.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Dual Super User II
Dual Super User II

@Markus_ 

Can you please try the below expression on a compose data operation

replace(uriComponent(body('Html_to_text')),'%20','\n')

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.
Community Support
Community Support

Hi @Markus_,

 

You could initialize a string variable named BreakLine, then input twice Enter button into the value(or once), then use replace() function repalce these "\n" to the variable BreakLine, for example:

replace(outputs('Compose_2'),'\n',variables('BreakLine'))

Screenshot 2020-09-28 143308.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

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

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (54,099)