I was trying to use a SQL Insert Row action to insert a new row in a SQL Server table and received a Bad Gateway error. First, I thought it was a permissions issue, then I thought my Flow stopped working…
Turned out to be an issue with the amount of data being inserted into a field. One SQL column was set to varchar(X) and the Flow was trying to insert more characters than X.
On the surface, this request sounded super simple and straightforward. “we need to copy files from a SharePoint library to Blob storage.” Simple enough? Well, yes, but the SharePoint library has a couple of required fields and a Flow is triggered by an action. –
Consider what I’m outlining below to be version ONE of the process. In the near future I will update this post with a slightly more resilient solution.
My SharePoint library has a required field titled DesinationFolder
Context of what I’m doing in the Flow: Trigger: When files is created in a folder When a file is added to a library the flow is triggered Get file metadata File Identifier: Use File identifier from the step above Get file properties Id: Use the ItemId from the previous step Initialize variable Name: vCheckedOut Type: Boolean Value: Checked out (field from Get properties) Initialize variable Name: vFolderPath Type: String Value: Condition vCheckedOut is equal to true Yes: Do until vCheckout is equal to False GetFileProperties Set variable Name: vCheckedOut Value: Checked out (value from the Get file properties above) No: Set variable Name: vFolderPath Value: FolderPath (SharePoint field)