Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Escape special characters to download SharePoint file

Posted on by 45

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
    Community Member Microsoft Employee 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans