← All posts Power Apps

Opening SharePoint attachment in a new tab

August 8, 2025  ·  Chinmay Gandi

In a SharePoint list, there is a field called Attachments where you can attach multiple files. These files are uploaded into the SharePoint site.

Suppose you want to share the attachment in Teams or mail — you have the option of Get attachments or Get attachment contents in Power Automate, as you can see below.

Get attachments action in Power Automate

The Get Attachments action has a property that gives you the link to the attachment as you can see below.

Attachment link property in Power Automate

But if you incorporate this URL in a Teams message or Outlook action, clicking it will download the file to your desktop. What if you want to open it in SharePoint instead?

Currently there is no built-in provision to open the attachment URL directly in SharePoint. But there is a workaround.

Workaround: Append ?web=1 to the attachment URL. This forces the link to open in SharePoint rather than triggering a download.
Appending ?web=1 to the SharePoint attachment URL in Power Automate

This makes sure the attachment link will open in SharePoint rather than being downloaded.

Important: If the file name contains spaces, the URL will not work. You need to replace spaces with %20 due to URL encoding.

Replacing spaces with %20 in the SharePoint attachment URL

Once this is done, the output will generate the correct URL that opens the attachment directly in the SharePoint list.