SharePoint Create File action does not support certain characters

Iron Contributor

I'm trying to use the Create File action in Power Automate with SharePoint Online. 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. The 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 _

 

Any suggestions? 

2 Replies
same issue. I'm surprised there is not more activity on this. Any ideas? My file name does not have special characters but the document library does and they were created fine using Power Automate actions. However the Create File action fails when trying to create a file inside of this document library with special characters in the name.

Hi Tim!
You can create a file with special characters, you need to use Http Request for SharePoint Connector in conjunction with Create a File to do this, as you need to update the file name after creating it...

Did a blog post a while back for exactly this, you can more or less just copy the code in there, just update the fields you need changed:
https://yourmodernworkplace.com/blog/create-sharepoint-file-with-special-characters-with-power-autom...