cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
issac_franklin
Helper I
Helper I

Format HTML Email Body

Hello People,

 

Hope someone will be able to help me here.

 

Background :

 

1. Get emails received in last 7 days from google alerts, merge it into one email and send it

2. We add disclaimer to external emails we receive in a HTML format, I would like to remove it using Power Automate along with some other content which I receive in the email body (Eg :- Unsubscribe, Send Feedback)

 

Current Status :

 

1. I am able to achieve the first part, however couldn't find a way to edit HTML content.

It would be great if someone could show some light here...!

1 ACCEPTED SOLUTION

Accepted Solutions
Shujaath_Khan
Solution Sage
Solution Sage

Hi @issac_franklin 

 

did you try to use replace expression and strip the HTML tag from each mail body like

replace(variables('testMailBody'),'<a href="https://example.com"> Unsubscribe </a>','')

 

Thanks

 

View solution in original post

5 REPLIES 5
Shujaath_Khan
Solution Sage
Solution Sage

Hi @issac_franklin 

 

did you try to use replace expression and strip the HTML tag from each mail body like

replace(variables('testMailBody'),'<a href="https://example.com"> Unsubscribe </a>','')

 

Thanks

 

issac_franklin
Helper I
Helper I

Hello @Shujaath_Khan 

 

Thank you for your input.

 

What you have suggested has worked.

Muthu_VIjayan
Frequent Visitor

I have a requirement for coloring a particular column in HTML table with 3 different cell background color based on cell value.

The source is from List rows from a excel table and the table which will be dynamic based on people update

Need your guidance and support to crack this logic for coloring a particular status column

Not started --> Red

In- Progress --> Yellow

Completed --> Green

Please explain with the Power automate connectors and expression screenshots where we are inputting the logic for cell Background colors based on cell value

Hi @Muthu_VIjayan 

 

Now assume you've the HTML body ready and you want to style particular <td> cell

you can try below

 

replace(variables('testMailBody'),'<td>Not started</td>','<td bgcolor="red">Not started</td>')

 

similarly for others as below

<td bgcolor="green">Completed </td>
<td bgcolor="red">Not started</td>
<td bgcolor="yellow">In- Progress</td>

 

P.S. Make sure the replace is able to find the tag properly for <td>Red</td>

Thanks

Hi @Shujaath_Khan 

 

Where i need to input these in power automate?

Can you share one sample screenshot of power automate flow which send a email with HTML table?

And where i need to add these styling?

 
 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,226)