- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 08:47 AM
Can someone please help?
When using Flow Designer OOB action (spoke) "Send Email"
we are receiving the following error:
Email validation failed: Email body is comprised of invalid HTML.
Which prevents the email from being sent.
We tried creating an Action with the Input of the Body Text as a String
And a Script Step with this code from another Community Post:
The output is of type String
But this does not work, it errors with the following message
Error: The undefined value has no properties.,Detail: The undefined value has no properties.
How can we resolve this issue so we no longer get the error:
Email validation failed: Email body is comprised of invalid HTML.
and our "Send Email" action in the flow works?
Help is greatly appreciated!!!
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 10:30 AM
Clean HTML- Flow Designer Action
Create a FD Action with Input:
Script Step:
Script:
(function execute(inputs, outputs) {
// Input variable
var htmlString = inputs.htmlString;
// Remove HTML tags using regular expressions
var cleanString = htmlString.replace(/<br ?\/?>|<\/p>/ig, "\n");
cleanString = cleanString.replace(/<script[^>]+>.*<\/script>/ig);
cleanString = cleanString.replace(/<style[^>]+>.*<\/style>/ig);
cleanString = cleanString.replace(/<[^>]+>/g, "");
// Output variable
outputs.text_out = cleanString;
})(inputs, outputs);
Create Action Output:
Call the FD Action from the FD Flow:
(this will get the latest email response)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 05:40 AM
Any help on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 10:30 AM
Clean HTML- Flow Designer Action
Create a FD Action with Input:
Script Step:
Script:
(function execute(inputs, outputs) {
// Input variable
var htmlString = inputs.htmlString;
// Remove HTML tags using regular expressions
var cleanString = htmlString.replace(/<br ?\/?>|<\/p>/ig, "\n");
cleanString = cleanString.replace(/<script[^>]+>.*<\/script>/ig);
cleanString = cleanString.replace(/<style[^>]+>.*<\/style>/ig);
cleanString = cleanString.replace(/<[^>]+>/g, "");
// Output variable
outputs.text_out = cleanString;
})(inputs, outputs);
Create Action Output:
Call the FD Action from the FD Flow:
(this will get the latest email response)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 05:09 AM
Hi @Su522 ,
I am facing the same challenge in my flow as well. Can you please how you have added this new action in your flow ? Do we need to place it before the send email action in the flow designer ?