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

502 BadGateway Error when creating OneDrive file

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"
}
}
}
21 REPLIES 21
Harry_G
Level 8

Re: 502 BadGateway Error when creating OneDrive file

@Mat_,

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

Capture.JPG

 

Thanks,

Harry_G

Mat_
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

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

Re: 502 BadGateway Error when creating OneDrive file

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
Level 8

Re: 502 BadGateway Error when creating OneDrive file

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

Re: 502 BadGateway Error when creating OneDrive file

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"
}
}
}
Mat_
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

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
Level 8

Re: 502 BadGateway Error when creating OneDrive file

@meganvwalker @Mat_,

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

1.JPGget current Email with attachments2.JPGSet create file3.JPGSet create file4.JPGRun Successfully

 

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

 

Thanks,

Harry_G

Mat_
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

Hi @meganvwalker,

 

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

 

Thanks

Mat

meganvwalker
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

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
Level 8

Re: 502 BadGateway Error when creating OneDrive file

@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

meganvwalker
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

Sure. Capture.PNG

nevilleZ
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

We have the exact same issue and it started this morning with more than 10 flows whos only job is to download the email attachment to onedrive

We have a ticket open with Microsoft, but have still to receive a reply.

I have recreated the issue by doing a new similar flow from scratch and encountered the same Bad Gateway 502 error.

Mat_
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

Hi @nevilleZ,

When/If Microsoft get back to you with a fix please could you let me know?

 

Thanks

Mat

nevilleZ
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

The flows worked today but we are still without a reply from Microsoft.

 

Mat_
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

@nevilleZ The flow worked for me too, I assume Microsoft have now fixed whatever they broke.

Community Support Team
Community Support Team

Re: 502 BadGateway Error when creating OneDrive file

Hi @Mat_,

 

Could you please try again with it?

Does the issue still happen?

What’s your location?

Generally, error code 502 means that the failure is temporary or transient. Please click or tap Resubmit to try the flow again.

I have made a flow likes below which is working fine.

1.PNG2.PNG

Please test it on your side and feel free post back if the issue still exits.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Mat_
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

Hi @v-yamao-msft,

The flow started working yesterday morning and i have had 0 issues since then, it seems like there was a temporary fault with OneDrive and Flow. 

What should I verify as the solution as there was no user solution?
Microsoft broke something then fixed it a day later.

Thanks

Mat

 

 

meganvwalker
Level: Powered On

Re: 502 BadGateway Error when creating OneDrive file

Agreed. This wasn't a user issue, but a MS issue. Thanks for all the feedback from everyone! But issue resolved itself (AKA MS fixed it). 

RLV1
Level: Power Up

Re: 502 BadGateway Error when creating OneDrive file

This issue, if resolved, is back in my flows.

 

I'm new posting here.  My flows look similar to the others:

 

receive email

export email

create file.....error, 502

 

 

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,101)