getContentBase64() returning empty stringIssue When using the GlideSysAttachment getContentBase64() function to pass attachments through an integration it is returning an empty string even though the attachment is present. ReleaseAnyCauseThe issue was due to the size of the attachment. As per our documentation, we can only convert files up to 5 MB. https://developer.servicenow.com/dev.do#!/reference/api/rome/server/c_GlideSysAttachmentScopedAPI#r_SGSA-getContentBase64_GRResolutionTo resolve the issue, make sure the attachment size is within the required size. However if the need to encode larger files is a business requirement, it is possible to create a global Script Include that can encode larger than 5Mb files. var BigEncoder64 = Class.create(); BigEncoder64.prototype = { initialize: function() { }, GetBase64EncodedString: function(attachment_sys_id) { var StringUtil = new GlideStringUtil(); var gsis = GlideSysAttachmentInputStream(attachment_sys_id); var baos = new Packages.java.io.ByteArrayOutputStream(); gsis.writeTo(baos); baos.close(); var base64Data = StringUtil.base64Encode(baos.toByteArray()); return base64Data; }, type: 'BigEncoder64' }; You can test it using a Background Script: var toto = new global.BigEncoder64(); gs.print(toto.GetBase64EncodedString('Your_SysId_of_A_big_Attachment')); To validate the results, you can use external website like https://www.base64encode.org/