cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ivan_wilson
Advocate II
Advocate II

SharePoint Create File action does not support certain characters

I'm trying to use the Create File action in Power Automate with SharePoint Online to copy a file from one library to another. However the operation fails with the error "File not found" if the filename includes # or % 

 

Both of these are valid characters in SharePoint file names. I don't get any errors when manually adding files with these characters in the file name. The SharePoint Update File action works fine with filenames that contain these characters. 

 

I've tried using the encodeUriComponent function on the filename. This does allow the file to be created,  but # and % characters are replaced with %23 and %25. 

 

I've also noticed that the characters { } and ~ get replaced with _ when you use the Create File action.

 

Any suggestions? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @ivan_wilson :

You can create the file first, and then rename it with http request:

vbofengmsft_1-1629192340139.png

The Result

 

vbofengmsft_0-1629192270177.png

I think this link will help you a lot:

Simple HTTP request to rename a file in SharePoint with Power Automate 

Best Regards,

Bof

 

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @ivan_wilson :

You can create the file first, and then rename it with http request:

vbofengmsft_1-1629192340139.png

The Result

 

vbofengmsft_0-1629192270177.png

I think this link will help you a lot:

Simple HTTP request to rename a file in SharePoint with Power Automate 

Best Regards,

Bof

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,472)