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

Copy Attachment from servicenow to third party application

Mark Wood
Tera Contributor

Hello Experts,

I am new to ServiceNow integration.

I want to copy an attachment from ServiceNow to the Aha third-party application.

I reviewed the Aha API documentation but couldn't figure out how to send an attachment to a third party. What should the content be for sending the attachment? I have attached the third-party Aha documentation link for your reference. Can anyone guide me on this?

Thank you.

Aha API  Link:

https://www.aha.io/api/resources/attachments/create_an_attachment_on_a_comment

 

8 REPLIES 8

Sandeep Rajput
Tera Patron
Tera Patron

@Mark Wood Please check if Aha support base64 encoded data. If yes, then you can encode your attachment to base64 encoding and send it via the API call.

Mark Wood
Tera Contributor

 

@Community Alums @Ankur Bawiskar @Kieran Anson 

can you please guide me on this?

 

The format of an attachment is either a multipart/form-data upload with the input name attachment[data] or a JSON payload pointing to an URL link:

Hello @Kieran Anson ,

I'm having trouble sending an attachment. Despite setting the attachment format to multipart/form-data, I still can't get it to work. Could you please briefly guide me on this?

I have attached the request body format that the third party requires for your reference, as I am unable to understand it.

Thank you.

Request body

------------XnJLe9ZIbbGUYtzPQJ16u1
content-disposition: form-data; name="attachment[data]"; filename="sample_plain_text.txt"
content-type: text/plain
content-length: 27

[uploaded data]
------------XnJLe9ZIbbGUYtzPQJ16u1--