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

Send attachment from Servicenow to JIRA using REST API

kumaran
Giga Expert

I am working in ServiceNow to JIRA integration using REST API, I have implemented all the fields to create JIRA issue.

I am currently trying to send attachment from ServiceNow to JIRA ticket using mid server.

I used the below code as example in the post Jira REST Integration - How to send attachment? :

var request = new sn_ws.RESTMessageV2();

              request.setHttpMethod('post');

              request.setRequestHeader("X-Atlassian-Token","no-check");

                request.setRequestHeader("Content-type","multipart/form-data");

              request.setEndpoint('https://{jiraURL}/rest/api/2/issue/SN-2/attachments');

              request.setBasicAuth("username","password");

              request.setRequestBodyFromAttachment('abd7460b0fe39e001dc906ace1050e9f'); //sys_id of attachment record

            var response = request.execute();

I am getting error in ECC Queue as 'attachment does not exists'

If anyone implemented this , please let me know .

Thanks in Advance.

31 REPLIES 31

Hi Harish,

 

Have u achieved sending the attachment from servicenow to jira, If yes please share the code you are using to send the attachment.

 

Thank You.

Hello Pedro,

 

Were you able to resolve this?

Thanks a lot Jessica for the code. We are also working in JIRA integration with SN. I am gonna try it now and share the results soon.


hi Jessica ,



i want to send attachment from servicenow to 3rd party using Rest.
Can you help me on this.
If you can share the code you used for sending attachment to jira, that can be very helpful


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




Thanks in advance



Neeraj


Hi ,

 

I am not able to send the attachment. Can you share the code here.