
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 02:44 AM
Hi all,
I have an interesting requirement that I'm very much struggling with.
The end goal: When an inbound email with the desired conditions is received, it triggers a flow. The flow submits a catalog item request. This catalog item has a HTML variable that should contain the exact contents of the email.
The issue is that no matter what I try, the variable once the cat item is submitted doesn't display in a desirable way at all. It's either blank, formatted in an unreadable manner or errors.
I even created a new HTML field on the sys_email table and set the value of it to be identical to the body field and used that in the flow, but still no luck.
This is how the action is set up:
I believe I need to set the value of this HTML field but I cannot find a way to do this in flow designer.
This is the closest I've got, pulling the body field through into the variable whilst having it as multi-line text instead, but it's unacceptable as it's hard to read in this format:
Any assistance would be greatly appreciated. Is this a limitation of flow designer? I've tried doing the same with a simple inbound action but even that is failing!
thanks
Harrison
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 04:24 AM
Maybe create an action to convert the body to HTML and then update the variable?
Following may be of assistance
https://community.servicenow.com/community?id=community_question&sys_id=31adb7bc1b0bec900b8a9979b04bcbec
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 03:08 AM
Hi,
Have you tried using instead of
?
REgards,
Kev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 04:24 AM
Maybe create an action to convert the body to HTML and then update the variable?
Following may be of assistance
https://community.servicenow.com/community?id=community_question&sys_id=31adb7bc1b0bec900b8a9979b04bcbec

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2022 01:25 AM
Hi Kev,
This actually worked perfectly. Thanks for the recommendation!
This also has the added bonus of being useful in the future I'm sure.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 05:03 AM
I suggest use the Catalog Item API script in your flow designer rather than the OOB 'Submit Catalog Item Request' Action.
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
var item = cart.addItem('e46305bdc0a8010a00645e608031eb0f');
//the variable 'fieldValue' will be dynamic - from the email body
cart.setVariable(item,'fieldName','fieldValue');
var rc = cart.placeOrder();