Flow design giving Email validation failed: Email body is comprised of invalid HTML. error

Community Alums
Not applicable

I've created a flow that has an action to pull the emails from sys_email table.  The Action is working perfectly but when I try to add the information to  the Email in the Flow I'm getting the following error:

Email validation failed: Email body is comprised of invalid HTML.
 
I have trimmed all of the HTML out of the Action but I'm still getting this error. 
Has anyone had this and know how to get it to render correctly?
 
thanks
1 ACCEPTED SOLUTION

Community Alums
Not applicable

I figured it out,  I put some regex in there to strip out the unwanted HTML code that was causing the problem <head></head><html></html><body></body>. 

Works great now.

View solution in original post

12 REPLIES 12

Ujjawal Vishnoi
Mega Sage
Mega Sage

Community Alums
Not applicable

Not really helpful in my situation, There is no answer on the link you sent.  I have an action that pulls the emails into an array so I have all of them then I'm simply running the action on the flow and getting the output.

I did log the output from the action and it's all HTML but I'm wondering if there is something in the email HTML that is screwing with the Send email action causing the error.  I'm trying to get around the error.

 

Our HR team wants a copy of the emails as proof and simply just sending the same the infor in step X is not good enough,  I want to include the header information as well. 

Either need a way to get this in or strip all the HTML out or render it as text with the html tags in it

 

Upender Kumar
Mega Sage

Can you share email body from the flow. I faced the same issue. Email body was copy paste from normal notification and ${email} script was in it.

So please verify.

Community Alums
Not applicable

it's not a notification script it's an SEND EMAIL flow design action