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 / Bad Gateway Error on S...
Power Automate
Unanswered

Bad Gateway Error on Send an Email

(0) ShareShare
ReportReport
Posted on by 67

Hello,

 

I've got a flow that essentially scans incoming emails for attachments and sends off an email to another inbox with the attachment attached. Here is a screenshot of the part of the flow that I'm sometimes getting errors on:

Untitled.png

 

I'm getting the below error on an extremely small number of flow runs. This flow runs 50-100 times a day and I'll usually get a similar error to this once every couple of days and I can't seem to figure out why. Resubmitting the flow run with the error results in the flow failing again.

 

{
 "error": {
 "code": 500,
 "source": "flow-apim-msmanaged-na-westus2-01.azure-apim.net",
 "clientRequestId": "6633fa92-30e7-40c6-a499-ef336c731e39",
 "message": "BadGateway",
 "innerError": {
 "status": 500,
 "message": "Unknown Error : {\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Maximum request length exceeded.\",\r\n \"innerError\": {\r\n \"request-id\": \"354de573-4167-4edf-8add-fc0ebf55bc91\",\r\n \"date\": \"2019-07-29T15:55:09\"\r\n }\r\n }\r\n}\r\nclientRequestId: 6633fa92-30e7-40c6-a499-ef336c731e39\r\nserviceRequestId: 354de573-4167-4edf-8add-fc0ebf55bc91",
 "source": "office365-eus2.azconn-eus2-01.p.azurewebsites.net"
 }
 }
}

 

Does anyone know what is going on here? I can't find anything that the failed runs have in common and often these errors have multiple attachments where all but one of the attachments flow through successfully, so it's not even the email itself.

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @StevenF19 ,

     

    Looks like this is a bug related to file size.

     

    Please see this thread.

     

    https://powerusers.microsoft.com/t5/I-Found-A-Bug/Error-code-500-bad-gateway-send-an-email-V2-with-attachments/td-p/325511

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

     

    Thanks

     

  • v-yamao-msft Profile Picture
    on at

    Hi @StevenF19 ,

     

    The issue has been reproduced and reported from my side.

     

    I will back to you once I got any updates.

     

    Best regards,

    Mabel

     

  • StevenF19 Profile Picture
    67 on at

    Thanks. Hoping for a fix for this soon as we're receiving a couple errors per day which need to be manually correct.

  • v-yamao-msft Profile Picture
    on at

    Hi @StevenF19 ,

     

    There is currently a limit of 4mb on payload size for graph.microsoft.com endpoint. We will consider increasing the limits to unblock your scenario if you can share the attachment size that your scenario involves.

     

    Best regards,

    Mabel

  • StevenF19 Profile Picture
    67 on at

    Hi Mabel,

     

    The attachment sizes can go up to around 10mb (they are all PDF invoices). There is one attachment that failed with the same error as the others with only a 3.25mb size however. Hoping this gets resolved as our goal is to not have to monitor this inbox daily.

     

    Thanks for your help!

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard