The CreatorCon Call for Content is officially open! Get started here.

How to convert attachment to Base64 format?

nirwan_ritik
Tera Contributor

Hi Community,

I am working on an integration where the 3rd party system requires ServiceNow attachments to be sent in Base64 format.
How to achieve this?

Regards,
Ritik

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@nirwan_ritik 

are you writing the login in global scope or scoped app?

Remember there are limitations on file size when you get base 64 encoded data for attachment.

What did  you start with and where are you stuck?

This is for scoped app

AnkurBawiskar_0-1758719018435.png

For global scope script refer response from @Sarthak Kashyap 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ravi Gaurav
Giga Sage
Giga Sage

Hi @nirwan_ritik 

Below video will help you

https://www.youtube.com/watch?v=MQmBx8Rp4u8&list=PLKH9bPqlw1neHQZWQpYXHKy7LGiG9lhZn&index=6

 

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/