cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamPo
Level 8

Converting HTML to Text

Hi,

 

I'm trying to convert a value I recieve via API from HTML to plain text. I need to post this info to another API that doesn't accept HTML.

 

Even though there are a number of 'div' and '&nbsp' in the HTML, the action simply removes all the HTML tags and squishs all the text together without any spaces.

2019-04-11_0952.png

Is this the expected behaviour of this action? Seems a bit pointless if this is the case.

 

Thanks,

Sam

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Level 10

Re: Converting HTML to Text

Hi @SamPo ,

I have made some tests on my side.

I am afraid it is the expected behaviour of this action.

You can use some different HTML for a test.

When I use the <p> tag, the text will have spaces.

Capture1.PNG

Best Regards,

Community Support Team _ Zhongys

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
v-zhos-msft
Level 10

Re: Converting HTML to Text

Hi @SamPo ,

I have made some tests on my side.

I am afraid it is the expected behaviour of this action.

You can use some different HTML for a test.

When I use the <p> tag, the text will have spaces.

Capture1.PNG

Best Regards,

Community Support Team _ Zhongys

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

am345357
Level: Powered On

Re: Converting HTML to Text

I have same issue. I want to convert email text (may be in Rich text or HTML) to plain text and send to sQL for inserting records. I have used "HTML To Plain text connector" and it display content with formatting into variable. But when I am assigning same variable to SQL stored procedure, there it shows "\n" in place of paragraphs. Also all spacing is killed. Do you have any suggestion to counter that?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 87 members 5,270 guests
Please welcome our newest community members: