web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 502 BadGateway Error w...
Power Automate
Unanswered

502 BadGateway Error when creating OneDrive file

(0) ShareShare
ReportReport
Posted on by 16

I have a flow which runs when an email is received and for each attachment it moves the attachment to a one drive folder.

This flow has been running for over 6 months (20,000+ runs) with no issue, today this flow wont work with the 502 BadGateway error on the create file step:Flow Error.PNG

The body is:

{
"error": {
"code": 502,
"source": "flow-apim-europe-001-francecentral-01.azure-apim.net",
"clientRequestId": "a6a09fd8-a5d8-4be8-ade5-2328ed890c6c",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "An unspecified error has occurred.",
"source": "api.connectorp.svc.ms"
}
}
}
Categories:
I have the same question (0)
  • Harry_G Profile Picture
    367 on at

    @Mat_,

    Please see your connection for creating a file. or reset the connection.

    Capture.JPG

     

    Thanks,

    Harry_G

  • MathewB Profile Picture
    16 on at

    Hi @Harry_G,

     

    Sorry I should have mentioned, i have already reset the connection by removing it comletely and re-adding it.

     

    Thanks

    Mat

  • meganvwalker Profile Picture
    52 on at

    I wonder if something is going on. I have experienced the same thing today. Exact same issue with OneDrive. Adding a comment, and hoping someone posts a resolution, OR that it resolves itself from Microsoft if it's a wider issue. 

  • Harry_G Profile Picture
    367 on at

    @Mat_ @meganvwalker,

    Seems strange error can you check the one drive space? maybe your drive was full or please share the screen shot of your create file connector and which content has to be created in one drive?.

     

    thanks,

    Harry_G

  • meganvwalker Profile Picture
    52 on at

    Thanks @Harry_G - here is the error. I deleted all files from OneDrive just in case that was causing the issue. The flow has been working without any issues for several days now. Then just broken this morning all of a sudden. 

     

    {
    "error": {
    "code": 502,
    "source": "unitedstates-002.azure-apim.net",
    "clientRequestId": "7eb0c0f9-4759-4658-922d-251e7e9403ca",
    "message": "BadGateway",
    "innerError": {
    "status": 502,
    "message": "An unspecified error has occurred.",
    "source": "api.connectorp.svc.ms"
    }
    }
    }
  • MathewB Profile Picture
    16 on at

    Hi @Harry_G,

    I have checked our Onedrive for any issues but there's plently of space and this has also occured to a colleague and her OneDrive. The Email has a system genrated pdf attached which hasn't been changed since this flow was first created.

    In short for each email it looks at each attachment (always 1) and for each attachemnt it creates a Onedrive file for it.

    Thanks

    Mat

  • Harry_G Profile Picture
    367 on at

    @meganvwalker @Mat_,

    I reporoduce the issue and make another flow for reference Please See the below pics,

    get current Email with attachmentsget current Email with attachmentsSet create fileSet create fileSet create fileSet create fileRun SuccessfullyRun Successfully

     

    If this Helpful to you please mark it as a solution.

     

    Thanks,

    Harry_G

  • MathewB Profile Picture
    16 on at

    Hi @meganvwalker,

     

    My Flow broke at around 7:00 this mroning, is it the same for you?

     

    Thanks

    Mat

  • meganvwalker Profile Picture
    52 on at

    Yes @Mat_ - that looks about the same for me. I wonder if it's location based. 

    @Harry_G mine was a step to upload a file from a URL. I'm going to wait and see if it resolves itself (why would it break if it was previously working) rather than recreating the entire flow just yet. 

     

     

     

  • Harry_G Profile Picture
    367 on at

    @meganvwalker,

    If you share screen shots of your flow so may be i will help you out and to reproduced the issue and give you a solution.

     

    Thanks,

    Harry_G

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 307 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 269 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 115 Super User 2026 Season 1

Last 30 days Overall leaderboard