how to download Attachment from the incident ticket using Servicenow Orchestration

satiz
Giga Contributor

I need to download the Attachment from Incident Ticket when the Ticket is create and do some excel manipulation in that file

26 REPLIES 26

flert
Kilo Contributor

Was anyone able to solve this?


I have the same issue and I can pass the parameters to the mid server, except for the actual fileContent, the filename parameter is passed fine.   I suspect it is the follow:



var fcParam = {"name":"fileContent","value": attachmentData};


executionParam.parameters.push(fcParam);



As when I check the mid server logs fileContent returns as null.   Is there a different syntax I should be using if I want to push it to the fileContent parameter?



Or is it possible to write it overwrite a input variable with the content and use that to push to through to the script include?   I'm not sure if I have the right syntax to push the fileContent value for use.  



Felix


FWIW: I have a job which exports attachements daily.   It uses a utility developed by Jason Petty and is available on the Share site


ServiceNow Share



If the link doesn't take you directly to it, search for "Export Attachments Tool".


It is straight forward in it's setup and has a 4 star rating. ( I'd give it 5 ).



find_real_file.png


flert
Kilo Contributor

Thanks Steve   I'll take a look.   Has this been tested on Geneva and up by any chance?


We're on Geneva, so I'd say yes. We're evaluating Helsinki, and we will test it there in the next week or so.


flert
Kilo Contributor

Strange,



I can't seem to import the update set into our instance (Geneva).   No errors .   I wonder if it's the formatting of the xml.   Is it possible to include what you have in your script include?   I feel I am just missing something on my end and the custom activity is causing me issues.