
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 11:41 AM
Hello, smart people. I have a lovely FLOW with a Trigger type of "Inbound Email"...
This Flow passes the Trigger variable "Body Text" to a custom ACTION. That looks as follows:
This value is then available in my custom ACTION in a SCRIPT STEP as follows:
var myHappyText = inputs.emailBody;
I noticed that this value comes in as PLAIN TEXT, not as HTML. I'm not sure what mechanism is used to strip away all the HTML and leave the PLAIN TEXT. That seems like magic. But anyway...
I want to Test and Debug my custom Action, using an existing email in our system. The email looks like the following. Notice that the "Body" here is HTML and contains all sorts of ugly tags:
When I go to Test / Debug my custom Action, I am presented with a dialog that asks for an "Email Body". That is one of my inputs of course. But the expected format is TEXT and all I have from my existing email is HTML. See here:
So how am I expected to manually convert my email HTML into the PLAIN TEXT which is required to test this custom ACTION?
I will need to do this again and again, so I hope there is a very easy way. And before you say "Use the Preview link", that DID NOT WORK and was not the same as what comes in from the Flow Body Text variable. Please advise. Thank you!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2024 09:34 AM
One thing you can do, I found out, is to test the FLOW which contains, or will contain, the Action you are building, and then in the Testing Output for the Flow, copy out the Body Text. Then separately, you can test the Action, and paste in that body text that came from the Flow test. It's a little cumbersome to do, but it works, and you can test the Action again and again this way.
(Shout out to my coworker Christopher Hendrix for this idea.)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 11:50 AM
@G24 Use an online HTML stripper like https://www.striphtml.com/. It removes all the HTML tags and returns the plan text which you can use in your custom action to test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 12:28 PM
You might to give the "Parse Email Flow Action" on Share a shot: https://developer.servicenow.com/connect.do#!/share/contents/8408077_parse_email_flow_action?v=2.4&t...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2024 09:34 AM
One thing you can do, I found out, is to test the FLOW which contains, or will contain, the Action you are building, and then in the Testing Output for the Flow, copy out the Body Text. Then separately, you can test the Action, and paste in that body text that came from the Flow test. It's a little cumbersome to do, but it works, and you can test the Action again and again this way.
(Shout out to my coworker Christopher Hendrix for this idea.)