web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Remove Links from Emai...
Power Automate
Unanswered

Remove Links from Email Body as HTML

(0) ShareShare
ReportReport
Posted on by 2

The following scenario:
As soon as a certain email arrives, I want to extract and edit the HTML body. It is important to really work with the html body and not with normal text (e.g. with the html to string action). At first I only want to extract a part of the email, this already works with substring. In the next step I want to remove all links. To do this, I wanted to remove the href attributes using replace and regular expressions. Unfortunately without success, I have used various regular expressions but the links are simply not removed. I assume this is because I am trying to manipulate an html element as a string.
In the last step the extracted part with the removed links should be sent to a backend, so all html formatting (except the links) must be preserved.

In the image i show my flow. In the ComposeContent action i try to remove the links. The rest of my flow works as desired.

image.png
Can someone help me here, I'm pretty new to Power automate? Thank you very much!

 

Categories:
I have the same question (0)
  • mjburley Profile Picture
    370 on at

    Unless it has changed recently, there is no built in reg expression handler in Flow, you need to write your own or use a 3rd party one.

     

    Using the ^ and * in your statement will be literal, not the regex meaning.

     

    There are plenty of blog posts out there with methods to replicate regex.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard