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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Gateway attachment siz...
Power Automate
Unanswered

Gateway attachment size limit

(1) ShareShare
ReportReport
Posted on by 20

HI All 

 

I have a flow that scraps an email for text and attachments. Then passes through an on-premises gateway to an internal api using a custom connector. 

This process completes fine as long as the attachment is under 3 Mb.  If the attachment is over I receive the following error, 

 

 

{
  "message""The request content-length is larger than '3182218' bytes. Current: '5046177' bytes.\r\nclientRequestId:  ***",
  "status"413,
  "error": {
    "message""The request content-length is larger than '3182218' bytes. Current: '5046177' bytes." 
"source""gatewayconnector
 
The API is successful using swagger internally with the larger attachment.
Is there a config file somewhere that restricts large file passing through the gateway, or am I on the wrong track.
 
Regards
Bevan
 
 
Categories:
I have the same question (0)
  • FoDelement Profile Picture
    435 on at

    Did you ever solve this issue? I am having the exact same issue. 

  • bevanmedley Profile Picture
    20 on at

    HI FoDelement

    No, I couldn't find any information to increase the limit. I ended up checking for attachment size and then landing the large files on an internal server (can pass these through the gateway to a file system but not to the api call...) along with a powershell script that was dynamically created with the api details. In the flow i ran a desktop flow ( unattended, need another licence for this) that ran the powershell script to call the api and upload the attachment, then delete both files. 

    Its a long way around but it works. 

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey Mate @bevanmedley 

     

    There is a limit on the Gateway attachment size limit.  

     

    https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Remove-2MB-limit-of-Service-Gateway/idi-p/902127 

     

    CFernandes_0-1619673145096.png

     

    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!

  • bevanmedley Profile Picture
    20 on at

    Hey CFernandes

     

    Thanks for the info, I did end up finding the limit but unfortunately no way to increase it.

     

    Cheers

    Bevan

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hello @bevanmedley 

     

    I hope you have upvoted the Idea.  

  • nitingupta4u Profile Picture
    28 on at

    Hi,

    I am facing the same issue even when the limits are upgraded to 20 mb

     

    nitingupta4u_0-1662618024596.png

     

    https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-onprem

     

    Nitin

  • zarski Profile Picture
    168 on at

    Hi, we have the same issue. Can anyone help?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello, same error, the limit is obviously not corrected, or there is another issue in place. I have the same limit 3182218 on up-to-date gateway.

  • zarski Profile Picture
    168 on at

    Hi, I contacted MS support and they are looking into it. I'll let you know when I know more.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Me too and I just got the response. The documentation is plain wrong, here is the part of the support email:

    miras1_0-1664174850027.png

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard