Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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.

 

  • StevenF19 Profile Picture
    67 on at
    Re: Bad Gateway Error on Send an Email

    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!

  • v-yamao-msft Profile Picture
    on at
    Re: Bad Gateway Error on Send an Email

    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
    Re: Bad Gateway Error on Send an Email

    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
    Re: Bad Gateway Error on Send an Email

    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

     

  • abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: Bad Gateway Error on Send an Email

    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

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1