OutBound Rest Message with a attachment

nagendra1891
Kilo Contributor

Hey guys,

I need to send ServiceNow attachments from the business rule when a record is inserted

Use case :   if new incident with attachment is created,   business rule needs to grab the attachment and post it to 3rd party endpoint

endpoint looks like this

curl ########################### \
  -H "Authorization: Bearer ACCESS_TOKEN" -X POST \
  -F attributes='{"name":"#######", "parent":{"id":"########"}}' \
  -F file=@myfile.jpg

can this be achieved with outbound rest message ?

any help is really appreciated

regards

NB

9 REPLIES 9

Neeraj Sharma10
Tera Guru

hi Nagendra,



Are you able do it?


i have a same requirement !   and struggling with sending attachments!



Thanks


Neeraj


Ankur Bawiskar
Tera Patron
Tera Patron

Hi Nagendra,



You must be having the third party endpoint and method which you will be using for sending details.


That endpoint should accept attachments.



Ask them the sample json request which accepts the attachment content.


The attachment data has to be sent by converting the attachment into Base64Encoded string



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Hi Ankur Bawiskar




Can you please help me in this


Business rule to send attachment to 3rd Party Tool via REST



Thanks in advance


Neeraj