cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Remove last few characters from the output of "Html to text" connecter

Hi there guys.

I'm trying to push new feed items to Buffer using the following flow (as a test I'm sending the feed item to my email address). As you can see I'm using "Html to text" connected to remove HTML tags from the feed.chrome_2018-09-28_14-19-25.png

 However, every feed summary item has a link enclosed in square brackets at the end of it. The actual output looks something like below: 

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. [http://feedburner.com/xxxxx/xxxxxxxx/123]

So, what I want to know is, is there a way to remove the last few characters from the feed summary. i.e, text link within the brackets and then push it to Email or Buffer. 

Thanks for your helps guys.

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Remove last few characters from the output of "Html to text" connecter

Hi @vamhh,

 

I wonder if the content of all the feed summary items is formatted like the one you provided, you might try to separate the text using Expression.

 

take(split(body('Html_to_text'),'['),1)

 

Using split() function, the text is separated into two parts by ‘[’, and then the first part is taken using the take() function.

Image reference:

16.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Remove last few characters from the output of "Html to text" connecter

Hi @v-bacao-msft, thanks for your help.

I've just tried your suggestion and it removed the URL. However, the output is now wrapped in double quotes and is enclosed in square brackets. Not only that but there are also newline characters (\n) Something like below.

["Lorem Ipsum is simply dummy text of the printing and typesetting industry.\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s."]

Can we remove the square brackets and double quotes?

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (4,560)