cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Invalid Character in Create File in Sharepoint Document Library

I have a flow that creates a file in a Sharepoint document library on the press of a button. I am trying to test it, but it only can create files that are one folder deep in the document library. Whenever I try to create a file that would be two folders or more deep in the Sharepoint library, it sends back a BadGateway Error. This is what I am attempting to do:

 

error1.PNG

 

And this is the error message that it spits back to me: 

message""BadGateway",
    "innerError": {
      "status"502,
      "message""The file or folder name \"Administration/IT/Dropbox Test /elmo\" contains invalid characters. Please use a different name. Common invalid characters include the following: # % * : < > ? /  |\r\nclientRequestId: 878fb54f-e4f4-47e6-ad9e-bca6afc1db7b\r\nserviceRequestId: 3401979e-7020-6000-d5cf-41c7a2e381d5;3401979e-102e-6000-d5cf-4a5aa3536326",
      "source""https://thecartercenter.sharepoint.com/Administration/IT/_api/web/folders/add(@p)?@p='%2fAdministration%2fIT%2fDropbox+Test+%2felmo'",
      "errors": [
        "-2130575245",
        "Microsoft.SharePoint.SPException"

 

 

For some reason, it seems to be replacing the second folder "/test" with a "\", which then produces an invalid character error. I have replicated this issue with numerous folder names, I have never run into this issue with creating files before, so any help on how to solve this would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Invalid Character in Create File in Sharepoint Document Library

Hi lexiNickens, I've noticed in the folder name "Dropbox Test ", it has a space at the end. What happens if you remove this? I know it is something very small, but in my previous cases with MS that is the first thing they ask you to confirm it doesn't have... Are you able to create a file anywhere else within your document library?

View solution in original post

4 REPLIES 4
Highlighted
Frequent Visitor

Re: Invalid Character in Create File in Sharepoint Document Library

Hi lexiNickens, I've noticed in the folder name "Dropbox Test ", it has a space at the end. What happens if you remove this? I know it is something very small, but in my previous cases with MS that is the first thing they ask you to confirm it doesn't have... Are you able to create a file anywhere else within your document library?

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Invalid Character in Create File in Sharepoint Document Library

Thank you for your response, but I don't think that is the issue. I am able to create files directly in the document library ("Dropbox Test") as well as within one subfolder. The error only happens when I am 2+ subfolders deep.

 

I also tested this on a document library with no spaces in the name, and the error still occurred.

Highlighted
Community Support
Community Support

Re: Invalid Character in Create File in Sharepoint Document Library

Hi @Anonymous,

 

Could you please share a full screenshot of the configuration of your flow?

I did the test on my side, there is no special configuration, it is filled according to the requirements of filed, Folder path is also 2+ subfolders deep.

But there is no problem you mentioned.

Image reference:

3.PNG

I noticed that the error code is shown as 502.  Since you have no such problem about creating files before, I wonder that the failure may be temporary or transient.

Please click or tap Resubmit to try the flow again and feel free let me know if issue still exist.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Invalid Character in Create File in Sharepoint Document Library

Hi,

 

I seem to have the same issue, and though the flow works fine for some of our users, I noticed it fails intermittently when creating a file in sharepoint for others. From what I have investigated, it seems to be tied to the type of keyboard used. Is there a way I can specify the type of keyboards used to trigger the flow?

flow fail.jpg

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (5,380)