How to print/log base 64 encoded attachment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 12:39 AM
We are using 'setRequestBodyFromAttachment ' to send attachments, which I know it converts the attachment to base64 encoded format.
How to print/log that payload? What ever I do, it prints 'undefined'.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 12:46 AM
check this link:
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 12:51 AM
See this:
Get a ServiceNow attachment file's contents as a string (Scope) · GitHub
Unable to use getContent method of GlideSysAttachment - Support and Troubleshooting (servicenow.com)
Generate Attachments in ServiceNow via REST | John Andersen (john-james-andersen.com)
Regards,
Shamma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:01 AM
please share your script and screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader