<?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 Re: Issue with Retrieving Entry ID for Files Attached to ServiceNow Tickets in Cortex XSOAR in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/1134224#M3865</link>
    <description>&lt;P&gt;Hello, i was able to find a solution, example of the function we are using :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;def function_to_read_sn_file(entry_id):&lt;BR /&gt;# extracts data from the service now file&lt;BR /&gt;&amp;nbsp; file_res = demisto.executeCommand('getFilePath', {'id': entry_id}) #since cortex stores the file somewhere in its backend&amp;nbsp;&lt;BR /&gt;&amp;nbsp; if isError(file_res[0]):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return_error("Error getting file path: {}".format(file_res[0]['Contents']))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; file_path = file_res[0]['Contents']['path']&lt;BR /&gt;&amp;nbsp; &amp;nbsp; with open(file_path, 'rb') as file: #you can continue doing whatever you want with the file&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2025 10:54:55 GMT</pubDate>
    <dc:creator>Wassif</dc:creator>
    <dc:date>2025-01-20T10:54:55Z</dc:date>
    <item>
      <title>Issue with Retrieving Entry ID for Files Attached to ServiceNow Tickets in Cortex XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/570625#M2930</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We encountered a persistent issue in Cortex XSOAR when trying to retrieve the entry ID for files attached to incidents imported from a ServiceNow instance. Our objective was to access and process an Excel file attached to a ServiceNow ticket within XSOAR. Despite various attempts and methods, we were unable to successfully access the file due to difficulties in retrieving its entry ID.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By manually inspecting the ticket info, we confirmed the presence of attached files. However, in the war Room entries for the incident there was no field entryID and no way to programmatically obtain the entry ID of these attachments via scripting.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We tried to retrieve the entry ID using the getEntries, the results doesn't contain EntryID of the attached files.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We attempted to use the tags associated with ServiceNow attachments (e.g., 'FilesFromServiceNow') to identify the file entries. Unfortunately, this approach also did not yield the desired file entry IDs.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;some errors:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;"Error getting file path: failed to get artifact file path, invalid file (52)"&lt;/LI&gt;
&lt;LI&gt;"No entry found with ID: [entryID]" "tried to upload the file manually in the war room.&lt;/LI&gt;
&lt;LI&gt;"No file found with the given tag."&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The main objective is to access the attached file (excel file) to the incident and extract data from it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 11:04:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/570625#M2930</guid>
      <dc:creator>Wassif</dc:creator>
      <dc:date>2023-12-21T11:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Retrieving Entry ID for Files Attached to ServiceNow Tickets in Cortex XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/573702#M3002</link>
      <description>&lt;P&gt;I would definitely recommend creating a ticket with support to take a closer look at this, seems like it needs some hands on troubleshooting.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 21:03:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/573702#M3002</guid>
      <dc:creator>Ivetto</dc:creator>
      <dc:date>2024-01-19T21:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Retrieving Entry ID for Files Attached to ServiceNow Tickets in Cortex XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/1066370#M3859</link>
      <description>&lt;P&gt;I encountered same issue.&lt;BR /&gt;&lt;BR /&gt;Anyone who solve the issue?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 06:13:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/1066370#M3859</guid>
      <dc:creator>S.Anggoro</dc:creator>
      <dc:date>2025-01-14T06:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Retrieving Entry ID for Files Attached to ServiceNow Tickets in Cortex XSOAR</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/1134224#M3865</link>
      <description>&lt;P&gt;Hello, i was able to find a solution, example of the function we are using :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;def function_to_read_sn_file(entry_id):&lt;BR /&gt;# extracts data from the service now file&lt;BR /&gt;&amp;nbsp; file_res = demisto.executeCommand('getFilePath', {'id': entry_id}) #since cortex stores the file somewhere in its backend&amp;nbsp;&lt;BR /&gt;&amp;nbsp; if isError(file_res[0]):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return_error("Error getting file path: {}".format(file_res[0]['Contents']))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; file_path = file_res[0]['Contents']['path']&lt;BR /&gt;&amp;nbsp; &amp;nbsp; with open(file_path, 'rb') as file: #you can continue doing whatever you want with the file&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 10:54:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-with-retrieving-entry-id-for-files-attached-to-servicenow/m-p/1134224#M3865</guid>
      <dc:creator>Wassif</dc:creator>
      <dc:date>2025-01-20T10:54:55Z</dc:date>
    </item>
  </channel>
</rss>

