Send Attachment SERVICENOW x FRESHDESK

BRUNO BANDEIRA
Tera Guru

Hello guys!

 

Maybe any of you could help me out wiith an issue that I am facing when I try to send and attachment from ServiceNow via REST API to FRESHDESK.

 

When I send the file via POSTMAN, it works just smooth, but, when I make the same call adding the sys_id of the sys_attachment table on the API call I keep received the message that the field is empty. The payload format received for FRESHDESK is pretty simple:

 

{

'attachments[]': <FILE>

}

 

Could anyone give me a hand?

2 ACCEPTED SOLUTIONS

Tony Chatfield1
Kilo Patron

Hi, unfortunately your post does not make your target platforms requirements or current SNC configuration clear.
Have you looked at restMessageV2 methods like setRequestBodyFromAttachment() ?

RESTMessageV2 - Scoped, Global | ServiceNow Developers
This thread may also contain some helpful information
Send attachment through REST API if Content-Type i... - ServiceNow Community

View solution in original post

Amit Verma
Kilo Patron
Kilo Patron

Hi @BRUNO BANDEIRA 

 

Below posts could be helpful :

https://www.servicenow.com/community/developer-forum/sending-attachment-using-rest-api/m-p/1786194

https://www.servicenow.com/community/developer-forum/send-attachments-as-part-of-rest-message/m-p/13...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, unfortunately your post does not make your target platforms requirements or current SNC configuration clear.
Have you looked at restMessageV2 methods like setRequestBodyFromAttachment() ?

RESTMessageV2 - Scoped, Global | ServiceNow Developers
This thread may also contain some helpful information
Send attachment through REST API if Content-Type i... - ServiceNow Community

Hello @Tony Chatfield1 thank for your answer.

The situation just resolved itself when the client pass me another API endpoint. Now the files are getting on the other side. But, I have a new problem about get the sys attachment data with the correct encoding.

I've just posted a new question: If you have any thoughts will be amazing:

https://www.servicenow.com/community/virtual-agent-forum/servicenow-attachment-encoding/m-p/2948691#...

Amit Verma
Kilo Patron
Kilo Patron

Hi @BRUNO BANDEIRA 

 

Below posts could be helpful :

https://www.servicenow.com/community/developer-forum/sending-attachment-using-rest-api/m-p/1786194

https://www.servicenow.com/community/developer-forum/send-attachments-as-part-of-rest-message/m-p/13...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hello @Amit Verma thank for your answer.

The situation just resolved itself when the client pass me another API endpoint. Now the files are getting on the other side. But, I have a new problem about get the sys attachment data with the correct encoding.

I've just posted a new question: If you have any thoughts will be amazing:

https://www.servicenow.com/community/virtual-agent-forum/servicenow-attachment-encoding/m-p/2948691#...