<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ServiceNOW Upload Attachment in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66742#M19347</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;im trying to upload attachment to the ServiceNOW record.&lt;/P&gt;
&lt;P&gt;I was able to use cURL for downloading (GET) the attachemnts based on the File Meta-data i can get from HTTP GET request. So based on Attachemnt Sys ID.&lt;BR /&gt;&lt;BR /&gt;I wanted to use again cURL for POST an attacment back to the SNOW, but i have troubles to make it work&lt;/P&gt;
&lt;P&gt;For downloding i have this:&lt;BR /&gt;"curl "&amp;amp;[URL]&amp;amp;"/api/now/v1/attachment/"&amp;amp;[ServiceNow Attachment Sys ID]&amp;amp;"/file --request GET --header ""Accept:*/*"" --user "&amp;amp;[Username]&amp;amp;":"&amp;amp;[Password]&amp;amp;" -o """&amp;amp;[Destination File FullPath]&amp;amp;""""&lt;/P&gt;
&lt;P&gt;For Upload i tried this in dozens of&amp;nbsp; variations based on the google results..&lt;BR /&gt;&lt;BR /&gt;"curl "&amp;amp;[URL]&amp;amp;"/api/now/v1/attachment/file?table_name="&amp;amp;[ServiceNow Table name]&amp;amp;"&amp;amp;table_sys_id="&amp;amp;[ServiceNow Ticket Sys ID]&amp;amp;"&amp;amp;file_name="&amp;amp;[FileName]&amp;amp;" --request POST --header ""Accept:application/json"" --user "&amp;amp;[Username]&amp;amp;":"&amp;amp;[Password]&amp;amp;" --header ""Content-Type:application/pdf"" --data-binary """&amp;amp;[Source File FullPath]&amp;amp;""""&lt;BR /&gt;&lt;BR /&gt;but it returns&lt;BR /&gt;{"error":{"message":"Method not Supported","detail":"GET method not supported for API"},"status":"failure"}'table_sys_id' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;BR /&gt;'file_name' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;BR /&gt;&lt;BR /&gt;With this solution:&lt;BR /&gt;curl &lt;A href="https://instance.service-now.com/api/now/v1/attachment/file" target="test_blank"&gt;https://instance.service-now.com/api/now/v1/attachment/file&lt;/A&gt; --request POST --header "Accept:application/json" --user XXX:XXX --header "Content-Type:multipart/form-data" -F 'table_name=ABC_case' -F 'table_sys_id=8928dfbd1b164c903ca37669cd4bcb95' -F 'uploadFile=@C:/Temp/test.pdf'&lt;BR /&gt;&lt;BR /&gt;i get: (26) couldn't open file "C:/Temp/test.pdf'"&lt;BR /&gt;&lt;BR /&gt;Any help how to solve it or different ideas how to do it?&lt;BR /&gt;Im no programme. Have only some basic VB.NET skills. Noob in using Webservices &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Pavel KrÃ¡l&lt;BR /&gt;RPA Specialist&lt;BR /&gt;MANN+HUMMEL Service s.r.o&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 24 Jan 2020 14:39:00 GMT</pubDate>
    <dc:creator>PavelKrál</dc:creator>
    <dc:date>2020-01-24T14:39:00Z</dc:date>
    <item>
      <title>ServiceNOW Upload Attachment</title>
      <link>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66742#M19347</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;im trying to upload attachment to the ServiceNOW record.&lt;/P&gt;
&lt;P&gt;I was able to use cURL for downloading (GET) the attachemnts based on the File Meta-data i can get from HTTP GET request. So based on Attachemnt Sys ID.&lt;BR /&gt;&lt;BR /&gt;I wanted to use again cURL for POST an attacment back to the SNOW, but i have troubles to make it work&lt;/P&gt;
&lt;P&gt;For downloding i have this:&lt;BR /&gt;"curl "&amp;amp;[URL]&amp;amp;"/api/now/v1/attachment/"&amp;amp;[ServiceNow Attachment Sys ID]&amp;amp;"/file --request GET --header ""Accept:*/*"" --user "&amp;amp;[Username]&amp;amp;":"&amp;amp;[Password]&amp;amp;" -o """&amp;amp;[Destination File FullPath]&amp;amp;""""&lt;/P&gt;
&lt;P&gt;For Upload i tried this in dozens of&amp;nbsp; variations based on the google results..&lt;BR /&gt;&lt;BR /&gt;"curl "&amp;amp;[URL]&amp;amp;"/api/now/v1/attachment/file?table_name="&amp;amp;[ServiceNow Table name]&amp;amp;"&amp;amp;table_sys_id="&amp;amp;[ServiceNow Ticket Sys ID]&amp;amp;"&amp;amp;file_name="&amp;amp;[FileName]&amp;amp;" --request POST --header ""Accept:application/json"" --user "&amp;amp;[Username]&amp;amp;":"&amp;amp;[Password]&amp;amp;" --header ""Content-Type:application/pdf"" --data-binary """&amp;amp;[Source File FullPath]&amp;amp;""""&lt;BR /&gt;&lt;BR /&gt;but it returns&lt;BR /&gt;{"error":{"message":"Method not Supported","detail":"GET method not supported for API"},"status":"failure"}'table_sys_id' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;BR /&gt;'file_name' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;BR /&gt;&lt;BR /&gt;With this solution:&lt;BR /&gt;curl &lt;A href="https://instance.service-now.com/api/now/v1/attachment/file" target="test_blank"&gt;https://instance.service-now.com/api/now/v1/attachment/file&lt;/A&gt; --request POST --header "Accept:application/json" --user XXX:XXX --header "Content-Type:multipart/form-data" -F 'table_name=ABC_case' -F 'table_sys_id=8928dfbd1b164c903ca37669cd4bcb95' -F 'uploadFile=@C:/Temp/test.pdf'&lt;BR /&gt;&lt;BR /&gt;i get: (26) couldn't open file "C:/Temp/test.pdf'"&lt;BR /&gt;&lt;BR /&gt;Any help how to solve it or different ideas how to do it?&lt;BR /&gt;Im no programme. Have only some basic VB.NET skills. Noob in using Webservices &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Pavel KrÃ¡l&lt;BR /&gt;RPA Specialist&lt;BR /&gt;MANN+HUMMEL Service s.r.o&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Jan 2020 14:39:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66742#M19347</guid>
      <dc:creator>PavelKrál</dc:creator>
      <dc:date>2020-01-24T14:39:00Z</dc:date>
    </item>
    <item>
      <title>RE: ServiceNOW Upload Attachment</title>
      <link>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66743#M19348</link>
      <description>Hi Pavel,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;were you able to make this work ? are you using HTTP VBO and running Get and Post Action to utilize the cURL ? i am trying to achieve similar goals for a different API and need to upload a file using cURL.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ishan Mahajan &lt;BR /&gt;India&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Mar 2020 07:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66743#M19348</guid>
      <dc:creator>IshanMahajan</dc:creator>
      <dc:date>2020-03-24T07:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: ServiceNOW Upload Attachment</title>
      <link>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66744#M19349</link>
      <description>&lt;P&gt;Hi Ishan,&lt;BR /&gt;&lt;BR /&gt;unfortunatelly i did not manage it, still i have it on my list, but currently busy with other stuff &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Pavel Král&lt;BR /&gt;RPA Specialist&lt;BR /&gt;MANN+HUMMEL Service s.r.o&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Mar 2020 11:43:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66744#M19349</guid>
      <dc:creator>PavelKrál</dc:creator>
      <dc:date>2020-03-27T11:43:00Z</dc:date>
    </item>
    <item>
      <title>RE: ServiceNOW Upload Attachment</title>
      <link>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66745#M19350</link>
      <description>HI Pavel,&lt;BR /&gt;&lt;BR /&gt;i could not do this using Blue Prism but i created a batch file using Blue prism and i execute it using Start Process Action, upon execution i am writing the output in a textfile and i am reading that text file back to understand the run status.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ishan Mahajan &lt;BR /&gt;India&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Mar 2020 11:56:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66745#M19350</guid>
      <dc:creator>IshanMahajan</dc:creator>
      <dc:date>2020-03-27T11:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: ServiceNOW Upload Attachment</title>
      <link>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66746#M19351</link>
      <description>I think you are using GET to submit a POST request. I was able to use it to upload attachments please refer below screenshot.&lt;BR /&gt;Params&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17544.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17695iA42C84CFF7ADFFF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="17544.png" alt="17544.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Request
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17545.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17699i1EB71B45C8BC98CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="17545.png" alt="17545.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Request Headers (you can &lt;SPAN&gt;parameterize the value as well&lt;/SPAN&gt;)&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17546.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17698i33F22D1C13DA0696/image-size/large?v=v2&amp;amp;px=999" role="button" title="17546.png" alt="17546.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Gopal Bhaire&lt;BR /&gt;Analyst&lt;BR /&gt;Accenture&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Mar 2020 14:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/ServiceNOW-Upload-Attachment/m-p/66746#M19351</guid>
      <dc:creator>GopalBhaire</dc:creator>
      <dc:date>2020-03-27T14:01:00Z</dc:date>
    </item>
  </channel>
</rss>

