cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamPo
Power Participant
Power Participant

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
Solution Sage
Solution Sage

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

3 REPLIES 3
v-zhos-msft
Solution Sage
Solution Sage

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.

 

Anonymous
Not applicable

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?

To me, this is not really a solution. Is there a way to preserve the spaces, etc?

Helpful resources

Announcements
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 tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Users online (3,975)