web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Escape special characters to download SharePoint file

(0) ShareShare
ReportReport
Posted on by 47

In Power Automate, I create a file dynamically and save in SharePoint. After that an HTTP response needs to download this file. the file is in format:


https://test.contoso.com/.../d24574f9-20c3-4dcc-8d8d-85cf5b7ac141 Mostly Software)-2021-2022_2022-07-29T05:25:17.5787842Z.zip

I checked in SharePoint and the file is correct : WashingtonBestITDepartment-ITSoftware&Hardware(But Mostly Software)-2021-2022_2022-07-29T05:25:17.5787842Z.zip
I need to escape the special characters (&, :, paranthesis) in order for the flow to download this file in users folder

I need to escape the special characters from the file name (&, :, paranthesis) in order for the flow to download this file in users folder

I realized there is no point in escaping any special character in the path, but just in the file name (this is how the browser changes once hover over the file. But I am not able to generate correctly the link to the file dynamically. 

I tried all the below but none give me correct escaping :

1. https://@{concat(variables('Portal Site UrlAndDocumentFolder'), '?file=', variables('FileName'), '.zip')} 

2. https://@{concat(variables('Portal Site UrlAndDocumentFolder'), '?file=', uriComponent(variables('FileName')), '.zip')}

3. https://@{concat(variables('Portal Site UrlAndDocumentFolder'), '?file=', encodeUriComponent(replace(variables('FileName'),':','')), '.zip')}

How can I escape the special characters?

Many thanks,

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Escape special characters to download SharePoint file

    Hi drhorg,

    Maybe you can post the thread in the following forum: 

    Forums - Power Platform Community (microsoft.com)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 109

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 109

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 77 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans