Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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
Community Support

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.
Frequent Visitor

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


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (5,725)