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 / 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,402 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,402 Most Valuable Professional on at

    Hello @bevanmedley 

     

    I hope you have upvoted the Idea.  

  • nitingupta4u Profile Picture
    26 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
    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
    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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard