Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Getting RANDOM 502 error, bad gateway. "The filename, directory name, or volume label syntax is incorrect..."

Like (0) ShareShare
ReportReport
Posted on 12 May 2020 15:29:07 by 33

Hi, 

 

Sometimes the flow works, sometimes I get this error. Basically, the flow creates automatically 9 folders when a new item is added to a specific list. This morning we added two lines, one worked, the second failed. I'm trying to figure out what's going on, if there's a pattern regarding the syntax. We "realized" (or guess?) that when the line title ends with a point (.) flow fails. 

I read that this 502 error is a temporary error so I tried to resubmit it a couple of minutes/hours after, but didn't work. 

Any ideas? 

 

task17.png

 
  "error": {
    "code"502,
    "source""canada-001.azure-apim.net",
    "clientRequestId""67444b4d-b6c3-4532-87c2-50d5c9ae6bed",
    "message""BadGateway",
    "innerError": {
      "status"500,
      "message""The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B)\r\nclientRequestId: 67444b4d-b6c3-4532-87c2-50d5c9ae6bed\r\nserviceRequestId: 67444b4d-b6c3-4532-87c2-50d5c9ae6bed"
    
task 18.PNG
  • jdoandlk Profile Picture
    3 on 23 Sep 2022 at 13:47:28
    Re: Getting RANDOM 502 error, bad gateway. "The filename, directory name, or volume label syntax is incorrect..."

    This was my solution, thanks

  • AlessandroM Profile Picture
    7 on 03 Jun 2020 at 13:50:29
    Re: Getting RANDOM 502 error, bad gateway. "The filename, directory name, or volume label syntax is incorrect..."

    same error here.

    Reading the topic I find a "blank space" at the end of the string. If i remove it, it works again. Thanks

  • Verified answer
    v-litu-msft Profile Picture
    on 15 May 2020 at 09:16:35
    Re: Getting RANDOM 502 error, bad gateway. "The filename, directory name, or volume label syntax is incorrect..."

    Hi @Eri_V,

     

    Yes, I tested it yesterday, if the folder name is ended by ".", it will report invalid character in the folder name. But if the dot in the middle of the folder name, it will not report, it is weird.

    And the Franch could name the folder if name it manually.

    It is true that there are some hidden restrictions that have not been indicated. Hope to follow the specification when naming.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Eri_V Profile Picture
    33 on 14 May 2020 at 19:28:23
    Re: Getting RANDOM 502 error, bad gateway. "The filename, directory name, or volume label syntax is incorrect..."

    Thanks for your answer. There's still something weird. Please look at restrictions indicated in the link you've shared: 

    Characters that aren't allowed in ... SharePoint Online * : < > ? / \ | 

     

    1. There's no point (.) in the restrictions

    2. A folder was created automatically by power automate with the name Enterprise A.B inc 

     however, automatic creation of the folder with name: Entreprise Blue Inc. failed 

     This makes me think that no name can be ended by a point (.) even if it is not indicated in the restrictions

    3. Last flow failed had the name: LYNE (LA TABLE HABILLÉE)

      However, there's no symbol on the name. 

     

    I guess that some restrictions are not indicated in the site 😞

     

     

  • v-litu-msft Profile Picture
    on 13 May 2020 at 05:29:16
    Re: Getting RANDOM 502 error, bad gateway. "The filename, directory name, or volume label syntax is incorrect..."

    Hi @Eri_V,

     

    These characters are not allowed in the folder name of SharePoint:

    ~ " # % & * : < > ? / \ { | }.

    For information, please refer to the document:

    https://support.office.com/en-us/article/invalid-file-names-and-file-types-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa?ui=en-US&rs=en-US&ad=US

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 87

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard
Loading started
Loading started