Good Morning,
I was looking to see if there was a way to remove hyperlinks and .img when converting using HTML to Text. I keep getting text for the images "cid:image001.png@01D6F62C.A63D7DD0 [cid:image001.png@01D6FED9.E0CFEE50]" and looking to have those removed during the flow. Here is a picture of my current flow setup. The main issue with the URL is they come as safelink and show as text and not a clickable URL so looking to remove those as well if possible. Thank you in advance for any help in resolving this.
@Paulie78 , I get same result, so I must have something else messed up. It was worth a shot. Thank you for the quick response!
Try using the expression:
decodeUriComponent('%0A')
Instead to represent a newline, or:
decodeUriComponent('%0D%0A')
for a CRLF.
@Paulie78, I'm having trouble with your suggestion. For the newLine node, it wouldn't let me leave Input empty, I put a space in the Input (not sure what I needed to do here).
My Output after the flow documented is: ${replace(replace(triggerOutputs?['body']?['body'],
I am new to Power Automate, just trying to get an e-mail pushed to Teams, but Teams dark mode is forcing me to convert HTML to text, which requires me to filter out the hyperlinks.
Thank you.
As it happens, I would know 😁
Add another filter after the first filter, use the output of the first filter as the input for the second filter. On the left side of the condition use this expression:
length(trim(item()))
then choose "is greater than", on the right hand side choose 0. Then use the output of the second filter as the input for the compose (instead of the first one).
Check out this part of the video I did on the weekend where I perform this exact step, if it is not clear:
https://youtu.be/7tZ6bRtco3Y?t=120
Thanks for the input on how to resolve this but I get a error. The only issue I am running into now is that is removing the Line breaks I had previously. Would you happen to know how to resolve that?
Expressions..
Split Action:
split(outputs('Html_to_text')?['body'], outputs('newLine'))
Filter Array:
@not(or(contains(item(), 'cid:image'), contains(item(), '[http')))
Compose:
join(body('Filter_array'), outputs('newLine'))
The compose will output a cleansed version without the links or images.
You can do it like this:
"cid:image001.png@01D6F62C.A63D7DD0 [cid:image001.png@01D6FED9.E0CFEE50]
Phase Alert
Desk
Thank you!
cid:image002.png@01D6F62C.A63D7DD0 [cid:image002.png@01D6FED9.E0CFEE50]"
I cut out some details that were work related but this is the normal output
@Anonymous Please share your HTML to text action output.
Thanks
Hardesh
Michael E. Gernaey
179
Super User 2025 Season 1
David_MA
161
Super User 2025 Season 1
stampcoin
143