cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lexiNickens
Level: Powered On

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
ArmandCronjé
Level: Powered On

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

3 REPLIES 3
ArmandCronjé
Level: Powered On

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
lexiNickens
Level: Powered On

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.

Community Support Team
Community Support Team

Re: Invalid Character in Create File in Sharepoint Document Library

Hi @lexiNickens,

 

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,198)