Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Z499INvALu/RUEFPdTiBns
Power Automate - Building Flows
Answered

Remove .img and hyperlinks

Like (0) ShareShare
ReportReport
Posted on 20 Feb 2021 15:19:50 by

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.

 

Olatham_0-1613834318445.png

 

  • zride91 Profile Picture
    20 on 11 Jan 2024 at 15:24:37
    Re: Remove .img and hyperlinks

    @Paulie78 , I get same result, so I must have something else messed up.  It was worth a shot.  Thank you for the quick response!

  • Paulie78 Profile Picture
    8,407 Super User 2025 Season 1 on 11 Jan 2024 at 15:08:36
    Re: Remove .img and hyperlinks

    Try using the expression:

    decodeUriComponent('%0A')

    Instead to represent a newline, or:

    decodeUriComponent('%0D%0A')

    for a CRLF.

  • zride91 Profile Picture
    20 on 11 Jan 2024 at 15:04:33
    Re: Remove .img and hyperlinks

    @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.

  • Verified answer
    Paulie78 Profile Picture
    8,407 Super User 2025 Season 1 on 22 Feb 2021 at 15:37:01
    Re: Remove .img and hyperlinks

    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

     

     

  • Community Power Platform Member Profile Picture
    on 22 Feb 2021 at 14:08:34
    Re: Remove .img and hyperlinks

    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?

     

  • Verified answer
    Paulie78 Profile Picture
    8,407 Super User 2025 Season 1 on 20 Feb 2021 at 22:30:00
    Re: Remove .img and hyperlinks

    GetRidOfCID.png

    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:

  • Community Power Platform Member Profile Picture
    on 20 Feb 2021 at 16:53:02
    Re: Remove .img and hyperlinks

    "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

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 20 Feb 2021 at 15:58:14
    Re: Remove .img and hyperlinks

    @Anonymous  Please share your HTML to text action output.

     

    Thanks

    Hardesh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard
Loading started
Loading complete