- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2025 09:06 PM
Hi,
We have a flow that triggers on an inbound email to convert it into an Interaction. I'm trying to ingest a particular email, but when the flow is triggered and it converts this email into an Interaction, it is replacing the Description with the following text: "(please use an email client that supports HTML)"
No other emails are having this problem, just this particular email I'm trying to get working.
This is the action being triggered that populates the Description of an interaction based on an email:
/**
* The Regex is looking for any of these 3 patters and replacing them with nothingness for inbound Interaction emails
* "[mailto:"..."]",
* "[https://links.dc2.pageuppeople"..."]"
* "<"...">"
**/
var subject = fd_data.trigger.subject;
var email_text_with_html = fd_data.trigger.body_text;
var email_text = email_text_with_html.replace(new RegExp('(?:(\\[mailto:|\\s\\[https:\\/\\/links\\.dc2\\.pageuppeople).+?\\]|<.+?>)', 'gm'),"");
var description = "Email Subject : " + subject + "\n\n" + email_text;
return description;
Checking the execution triggers, if I open the Inbound Email, "Body" contains the following: (Have replaced IP Addresses with fake text)
<ol><li><strong>N1.02 - Lab Room</strong> - <a href="FAKE TEXT">FAKE TEXT</a> - DeviceCheckin - [Failed to checkin. Last seen 32m 20s ago.](0ms ago)</li></ol><p>The panels listed above may need attention. Go to <a href='FAKE TEXT'>FAKE TEXT</a> for more information.</p><p>There will be no more notifications for the next 24 hours unless an error condition clears and then faults again within that time.</p><p><small><em>Concierge Companion 2.3.303</<em></small></p>
yet Body Text returns the runtime value of "(please use an email client that supports HTML)"
According to the SN Inbox, the Content type of these emails is 'multipart/mixed'
Looking at logs, this error pops up around the time the flow is triggered: The requested flow (canRead on element dot walk from sys_email:af2ad6af83f1a6107d4543547daad3b9) operation was prohibited by security rules.
But we're having problems trying to locate what security rule is being prohibited from running, that sys_id does correlate to the email being ingested though, so it seems to be related.
Any ideas what is causing this? Or ideas on how I can get Interaction Description to populate based on the Body instead of Body Text for these particular emails?
I'm still new to ServiceNow Developing and learning as I go, so hopefully this makes sense, and thank you in advanced for any help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2025 05:21 PM
Managed to get around it.
In the flow in the step before the action that generates the description, added a lookup that checks for the email record, then altered the script slightly to say if it's this particular email, populate description using body instead of body_text.
var subject = fd_data.trigger.subject;
var email_text_with_html = fd_data.trigger.body_text;
if(subject=='Concierge Companion: Panels require attention (companion)')
{ email_text_with_html = fd_data._30__look_up_record.record.body;}
var email_text = email_text_with_html.replace(new RegExp('(?:(\\[mailto:|\\s\\[https:\\/\\/links\\.dc2\\.pageuppeople).+?\\]|<.+?>)', 'gm'),"");
var description = "Email Subject : " + subject + "\n\n" + email_text;
return description;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2025 09:23 PM
is this happening to only 1 type?
what's the difference with the other types?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2025 09:44 PM
I've tried manually changing the Content Type from multipart/mixed to text/html and text/plain, same issues.
Other emails with the Content Type multipart/mixed also do not have this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2025 10:25 PM
was this working fine earlier?
did you recently upgrade?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2025 10:40 PM
For the specific emails I'm attempting to ingest from the original post, it's never worked.
All other emails are ingesting and converting to Interactions just fine, displaying the email body in the Interactions' Description field.
We're on Xanadu Patch 7a.