How to send attachments to 3rd party system through Base64?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 11:16 PM
Hi,
We are integrating with 3rd party system flow designer for sc_req_item table, we need to pass the attachment to them in base64 format. In the script action in the flow ,used the below code but returning null to me.
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_sys_id', inputs.bulk_csv);
gr.query();
while(gr.next()){
var sysAtt = new GlideSysAttachment();
var base64Data = sysAtt.getContentBase64(gr);
gs.info(base64Data);
}
outputs.attach = base64Data;
The 'attach' variable is returning null.
How to fix this?
Thanks in advance
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader

