cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kb_seeker
Advocate I
Advocate I

Flow, Outlook attachment save to On-premise Sharepoint 2013 failed at "Create File", error: 502

Please help and thanks.  Created Flow from template "When a new email arrives in a shared mailbox", O365 mail to Sharepoint 2013 on-premise.  Saving attachment from mail to SP.  This is working for file size that is around 100k, but failed with anything close or above 1mb.  I found a thread that points to this issue in 2016, not sure why it is still happening to me.  I updated my data gateway today, change some settings, but nothing seem to work.

 

Error:

BadGateway.

{
  "error": {
    "code"502,
    "source""msmanaged-na.azure-apim.net",
    "clientRequestId""",
    "message""BadGateway",
    "innerError": {
      "status"502,
      "message""Gateway on endpoint '<ii>sb://wabi-west-us-relay24.servicebus.windows.net/5acd34f5-142f-4995-a72e-19d2b5a9236c/</ii>' is unreachable.\r\nclientRequestId: d\r\nserviceRequestId: dsdfsdfsdfsdfsdfsdfsdf",
      "source""https://sharepointonlineconnectionprovider-westus.tip0-westus.p.azurewebsites.net/datasets/https%253A%252F%252Fsites1.sp./......./files?folderPath=%2FEmail%20Documents&name=Interactive%20Care%20Experience%20Reporting%20Year%20End%202017.xlsm&queryParametersSingleEncoded=True",
      "errors": []
    }
  }
}

 

5 REPLIES 5
v-yuazh-msft
Community Support
Community Support

Hi @ kb_seeker,

 

Could you please share a screenshot of the configuration of your flow?

Do you mean the flow would run failed when the file size is close or above 1mb?

Does the same flow would work fine when the file size that is around 100k?

Have you checked if the network is fine when the flow run failed?

 

Please check if the network is on good condition when the flow runs and let me know if the issue still exists.

 

 

 

Regards,
Alice Zhang

Hi v-yuazh-msft,

 

Looks like my file size is a bit off from the test I ran before.  I ran a few more test consecutively, a couple of minutes apart.  The problem starts around 3 mb file size now.  I work at a huge enterprise, dont think the network is the issue.  Additionally, I am running the test right now, at a time that 80% of workforce is off.  I have also updated my on-premise data gateway, no help.  Please review the setup and run history screenshots below.  Thank you for your help.

Edit* The failure happens at the "Create File" section.  I noticed the Email I sent included a small signature image file.  Even thought the large Excel file failed to save, the small signature image file was saved successfully.  This is a strong indication the file size is the cause of failure.

 

 

Hello, @kb_seeker!

 

 

Thank you for posting in the Flow Community! If you feel as though your issue was solved, please mark the reply as the "Accepted Solution" so that other users may find this info and utilize it more easily. 

 

Thank You!

-Gabriel

(Flow Community Admin)

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



bennibru
Regular Visitor

 I keep getting the same error when performing a "Create file" action on On-premise Sharepoint 2016 via the on-premises data gateway. Tested with various file types and file sizes, and it's working fine up to a filesize of pretty much 3 MB. For every file bigger than 3 MB the Flow gets stuck in the "create file" step and is failing with the "Bad Gateway" error posted above.

 

According to this post gateway limit should be at least 20 MB (which would be fine for our cause), can't find any official documentation on the file size limit of the on-premises data gateway though.

 

Any help would be much appreciated as we're running the Flow on a productive system and atm have to exclude larger files to prevent the Flow from failing.

MS support told me our SP 2013 on premise is limited for some reason and will likely not work with Flow for file greater than 3 MB. It’s Unfortunate, it’s also a problem for 2016. However, we also have SP Online, I tested SP online, work up to around 30 MB. Took them three weeks of troubleshooting to finally gave up and told me it’s limited in on premises version.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,189)