Launching Office 365 Files from Power Automate Desktop
    • Dark
      Light
    • PDF

    Launching Office 365 Files from Power Automate Desktop

    • Dark
      Light
    • PDF

    Article Summary

    The On-premises Data Gateway is the preferred way to send files from the cloud to a local device, but for some organizations, they have restrictions around how data is sent from the cloud to the local device. Currently, Power Automate Desktop only supports text input types from Cloud flows to Desktop flows, so there is no direct way to send binary files through that channel.

    For example, perhaps we have an Excel file that has been added to a SharePoint library and we want it to be processed inside of Power Automate Desktop. Without an On-premises Data Gateway, it becomes difficult to process this file in Power Automate Desktop. Or is it? What we can do is send the Office 365 link, like a SharePoint link, from our Cloud flow to our Desktop flow and then use the CMD action to open the URL with the local application, Like Microsoft Excel.

    Solution

    • Define an Input Variable called FilePath. Then provide appropriate values for your Office 365 URL as your Default Value and set External name to FilePath.
      1-variable

    • Add an Open CMD Session action to your design surface. Leave the Working folder blank and then click Save.
      2-Open

    • The previous step will create a command line session. We will subsequently write to this session using the Write to CMD session and use the output variable that was generated in the previous step as our CMD session input. For the Command input we will provide "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" %FilePath%. This value represents the location of our Microsoft Excel installation and the variable that we previously included that includes our link to our file.
      3-write

    • We can now go ahead and run our process. When we do, our Excel spreadsheet will be retrieved from the cloud and loaded into Excel. From here we can manipulate the file using Power Automate Desktop like it is a local file. When we perform the save action, it will save our file directly back in the cloud.
      4-result(4)

    Conclusion

    While the On-premises Data Gateway continues to be our best option for the exchange of files between Cloud flows and Desktop flows, we did learn of a new approach that allows us to pass a link to a cloud file that we can open with a desktop application to mitigate the need for a gateway in this situation. To see a YouTube video of this content, please check out: Launching Office3 365 Files from Power Automate Desktop without a Gateway.


    Was this article helpful?