Azure Logic Apps: Insert MULTIPLE rows to Azure SQL Database

2.4k views Asked by At

I was wondering if there is a way to insert multiple rows to Azure SQL Database using the SQL connector in Logic App.

I've got a HTTP GET request which returns an array of results. I want to use the items of this array as data source for row inserts.

I know there is a way to iterate through arrays in Logic Apps using "foreach". I have tried this and the "Insert Row" action fails because "foreach is not supported in API connector action".

Is there a different way of achieving this?

1

There are 1 answers

4
jeffhollan On BEST ANSWER

We don't yet have a batch insert but it is on the backlog. However it's still possible by writing a stored procedure that takes an array. For example you could write a stored proc that takes an OPENJSON array and inserts one row per item