Send attachment from Servicenow to JIRA using REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 02:59 AM
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.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2021 11:27 AM
Yes please share me the code..
We are using webhook.. Scripted rest api from jira to Snow field mapping.
Please help
Regards
Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2021 06:18 AM
Hello,
We are working on ServiceNow <> JIRA Integration and we have a requirement to send the attachment by using MID Server script include.
Can you assist by sharing the code. You can connect on attarkhozema@gmail.com
Regards,
Khozema
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2017 08:44 AM
Hello All,
Sounds like everyone is having some trouble with the attachments. I found that it takes 8 different web service calls to move one record with an attachment from SNOW to Jira.
The native Perspectium app in the SNOW platform solves this issue, synchronizing data in real time between instances and Jira - all natively with no coding / web servicees. if anyone would like more information please feel free to contact me directly william.morisseau@perspectium.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2017 07:37 PM
I am not familiar with Jira's web service calls, but with others that I have worked with, I have found that to send a file to another system, it needs to first be converted to Base 64.
Here is some info from the guru that might be able to help with that.
I used this to send a file from SNow to Workday.
Sending attachments to a 3rd-party service desk - ServiceNow Guru
https://youtube.com/watch?v=zYi8KhP9SUk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2017 09:32 AM
Hi Kumaran,
You might want to look at the platform DragonGlass. It has connectors to both servicenow and jira, and utilizes REST APIs in order to aid its search capabilities. It extracts data and you can also search and create analytics across data stores. Hope this helps.
Thanks,
Domenico