Automate “Import Update Set from XML” (sys_remote_update_set XML) via script/Flow on Zurich (no UI)

LeonardoMora
Kilo Contributor

Hi community,
I’m implementing an update set restore process from Azure Blob Storage back into ServiceNow (version Zurich). The goal is that a user submits a request (RITM) and a Flow runs everything server-side:

  1. List backup “folders” (Azure blob prefixes) and let the user pick one (it contains multiple  sys_remote_update_set_*.xml  files).
  2. Download each XML and store it as an attachment in a staging record (custom table).
  3. Import each XML so ServiceNow creates the Retrieved Update Sets structure, specifically:
    • sys_remote_update_set  (including batched cases with parent/children and  remote_base_update_set ).

I confirmed the OOB UI Action “Import Update Set from XML” only opens:

var url = new GlideURL('upload.do');
url.addParam('sysparm_target', 'sys_remote_update_set');
...

and I can’t find a clear “processor” behind it.

Questions:
  • Is there a supported/documented way to invoke the equivalent of “Import Update Set from XML” by script (create  sys_remote_update_set  +  sys_update_xml ) from an XML file, without relying on the UI ( upload.do )?
  • Is there any recommended internal class/API (e.g., “UpdateSetImporter”, “RemoteUpdateSet…”, or similar) that can be called from a Script Include / Flow Action to process the XML?
  • If the only practical option is to call  upload.do  programmatically: does anyone have a reliable example of building the multipart/form-data server-side in ServiceNow to upload the XML so the import runs correctly?
  • For batched XML: what is the most reliable way to identify the parent/child sys_ids created by the import and correlate them back to my staging records?
Additional context:
  • Zurich, triggered from Flow Designer (RITM).
  • The XML files are exported as  sys_remote_update_set  XML (not local  sys_update_set  XML).
  • The later phase (preview/commit) is manageable; the blocker is “import XML → retrieved update set”.
Any guidance, recommended classes, or working examples would be greatly appreciated. Thanks!
0 REPLIES 0