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

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.

Hey there, know this is kind of old, but where did you include the regex?
You'd think they'd add some sort of escape HTML on the string...

Did you add this using the "Replace String" transform function? 

If so, what is the regrex and string?

Can you please explain how you did this?

Can you please explain where you added regex, its a new flow action and you added before send email action?

I am facing same issue and I added new script action but getting output blank and getting description field blank on email notification.