Automic Workload Automation

 View Only
  • 1.  Leveraging Automic to download files from Microsoft Sharepoint.

    Posted Jun 12, 2024 05:05 PM

    We are looking at automating the download and file transfer of files from our Sharepoint site and distribute that document internally through Automic. 
    Has anyone ever set something like this up?

    Where we are struggling is trying to evoke a REST API GET to download but when the process runs it immediately errors out with  connection closed:

    IF there is any other method that would be easier, I am open to hearing that. We are just trying with Rest since our idea was it would be easier.

    Currently this is Automic v 21.07 hosted on Windows platform. 



    ------------------------------
    [Senior Software Consultant]
    [Robert Mark Technologies]
    [MN]
    ------------------------------


  • 2.  RE: Leveraging Automic to download files from Microsoft Sharepoint.

    Posted Jun 13, 2024 01:52 AM

    Connection closed sounds to me, that your job didn't reach the endpoint. So you might check the network first. Are you using the onprem Sharepoint or the M365 Sharepoint online?

    In general I would always have a look at marketplace.automic.com for action packs (the available Sharepoint related solutions seem to be quiet old). I've been using the Python O365 module for accessing Sharepoint online using OS JOBS.



    ------------------------------
    ☎️ Swisscom Automation Engineer & 🧙 PE Membership Creator

    Automic Kurse, Tutorials, Tools und mehr auf:
    https://membership.philippelmer.com/
    Zwei Wochen kostenlos testen!
    ------------------------------



  • 3.  RE: Leveraging Automic to download files from Microsoft Sharepoint.

    Posted Jun 13, 2024 12:06 PM

    We have recently finished a POC for retrieving files from a 0365 SharePoint site via https://graph.microsoft.com/v1.0 there were no issues getting the file for us, but some caveats were: On Web Service Request tab, Parsing Configuration, ensure that "is binary" is checked and using Custom Report File name to save the downloaded file.

    We were using GET /sites/{siteId}/drive/items/{item-id}/content endpoint.




  • 4.  RE: Leveraging Automic to download files from Microsoft Sharepoint.

    Posted Jun 19, 2024 04:46 AM
    Edited by Michael A. Lowry Jun 19, 2024 04:47 AM

    We developed a solution based on the PnP PowerShell module.

    We store Base 64-encoded certificates in LOGIN objects and pass them on the command line in the UC4 job (A PowerShell script).

    The SharePoint Online job in UC4 uses various cmdlets (small, lightweight commands) of the PnP PowerShell module to authenticate and perform file operations in SharePoint Online.

    1.  The UC4 job authenticates with MS Entra using the provided client ID and certificate with private key. Behind the scenes, MS Entra provides an authentication token.
      • Connect-PnPOnline
    2. Once authenticated, the UC4 job  establishes a connection to SharePoint Online.
      •  Get-PnPConnection
    3. The UC4 job performs the requested action (read, write, delete).
      • Add-PnPFile, Get-PnPFolderItem, Get-PnPFile, Remove-PnPFile
    4. The UC4 job finally disconnects from SharePoint Online.
      • Disconnect-PnPOnline