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,

  • 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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Adis Profile Picture

Adis 136 Super User 2025 Season 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 81

#3
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 77 Super User 2025 Season 1

Product updates

Dynamics 365 release plans