Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

BadRequest 400 saving outlook attachment to file server


I have an O365 outlook account, using MS Flow to save email attachments to OneDrive and to SharePoint successfully.  I cannot get MS Flow to save the email attachment to a shared file server on our internal network.  I am getting the dread 'BadRequest' 400 error. In the Create File step, it says 'Key 'gateway' not found in connection profile', source ""


Do I have to have a gateway installed?  I do not understand why the authentication to the hosted MS applications (OneDrive and SharePoint) works without issue, but I cannot get it to my file server.  Please help.  



Community Support Team
Community Support Team

Re: BadRequest 400 saving outlook attachment to file server

Hi @TheresePawlicki,


Could you please share a screenshot of your flow's configuration?

How do you create a connection to the File System connector within your flow?


The error message told that the On-premises data gateway could not be found within the connection to the File System connector on your side.


If you want to connect to File Systems on your local or network machines to read from and write to files within Microsoft Flow, you must use the On-premises Data Gateway. In addition, not just the File System connector, if you want to connect to other local servers (e.g. Local SQL Server, Local SharePoint site, etc.) within your flow, you should also use the On-premises Data Gateway to create a connection to these local server.


I have created a connection to the File System connector using the On-premises Data Gateway within my flow and the screenshot as below:12.JPG


I have made a test on my side and please take a try with the following workaround:13.JPGThe flow works successfully as below:14.JPG




Please take a try to install a On-Premises Data Gateway on your side based on the following article:

On-premises Data Gateway for Microsoft Flow


More details about the File System connector, please check the following article:

File System connector



Best regards,




Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: BadRequest 400 saving outlook attachment to file server

Hi Kris,


Here is a screenshot of the configuration.  I have reached to our local IT to request a gateway.  It looks like I am missing that piece. Thanks for your help.  Once I get this working, I will come back.


create file.jpg

Helpful resources


Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.


Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 388 members 4,444 guests
Please welcome our newest community members: