How to construct a Sharepoint filepath with sourcedoc param?

I have uploaded an Excel file to Sharepoint and want to share the link to the file in email.

https://ABC.sharepoint.com/teams/xyz/pqr/Reporting/Dev Test/Item 1234/Preliminary/Scheduled 2020.10/filename.xlsx

The shared link asks user to download the file locally. I want that file to open in browser. When I open it manually URL looks like:

https://ABC.sharepoint.com/:x:/r/teams/xyz/_layouts/15/Doc.aspx?sourcedoc={7BB3107C-EE9C-4F15-A635-96D186B0089D}&file=filename.xlsx&action=default&mobileredirect=true

Can anyone help in generating the path or getting sourcedoc?

Thanks!

Hi @papulepooja

Could you specify how this request relates to UiPath? Even though our community is super helpful, I believe a forum focused on SharePoint might know this one a bit better :slight_smile: