Email Notifications Character Limit Limitation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 09:38 AM
Hi everyone. I've been trying to setup a notification email for one of the catalog items. The problem that I am encountering is that the email message is truncated. I believe this is caused by a character limit restriction. The form is roughly 3.2k characters and it can get as big as 7k characters when it's filled. I tried playing with glide.email.outbound.max_body_bytes and com.glide.email.max_body_bytes to change the size, but even then, the message gets truncated in the same place. I also made sure that their sum is nowhere close to the maximum. Is there anything that I am missing ? The goal is to email the entire request form to a distribution list. An alternate way would be converting that form into an attachment and emailing it but I have no idea how to do that either. Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 09:54 AM
Hi,
https://docs.servicenow.com/bundle/london-servicenow-platform/page/administer/notification/reference/r_EmailBodySizeLimitProperties.html
Please see first you are getting a message that body is truncated in by ServiceNow or at email client or email server?
When it gets truncated at ServiceNow end, we see error message as documented below.
Creating a attachment is possible, but its time consuming. There is PDF file generator plugin which ServiceNow provides, it comes with HR management pack ( not sure about new scoped app of HRSD though ). However, that PDF generation also requires a lot of work to be done.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 09:59 AM
Hi, Below code would generate the form PDF and attach to itself.
Put this into a UI action
var attachment = new sn_ws.RESTMessageV2();
attachment.setHttpMethod('GET');
var url = gs.getProperty("glide.servlet.uri") + current.getTableName()+ '.do?PDF&sys_id=' + current.sys_id;
attachment.setEndpoint(url); attachment.setBasicAuth(gs.getProperty('glide.user.userid'), gs.getProperty('glide.user.password')); attachment.saveResponseBodyAsAttachment(current.getTableName(), current.sys_id,current.number+".pdf");
var response = attachment.execute();
Create an event in registry.
In same UI action, you can use gs.eventQueue to fire an event and, create an email notification and check include attachment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 10:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 10:20 AM