How can I use the output from an "Execute Stored Procedure (V2)" in a "Create CVS Table" in Logic Apps

Mike Stapleton 6 Reputation points
2021-04-08T19:00:17.377+00:00

I am able to use the output from a "Get Rows (V2)" by using the "Value" from dynamic content. But when I use the "Execute Stored Procedure (V2)" I don't have a "Value" option. The choices from dynamic content are "Body", "Outputparameters", "Resultsets", and "returnCode".
I tried to pass in "Resultsets" I get error msg:

BadRequest. The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'.

Thanks

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Stapleton 6 Reputation points
    2021-04-14T15:38:18.14+00:00

    I figured it out.

    You need to use "Resultsets" as input to the "Create CSV Table".
    Then go into code view and find:

    "from": "@Tomas Podoba ('Execute_stored_procedure_(V2)')['resultsets']"

    change it to this:

    "from": "@Tomas Podoba ('Execute_stored_procedure_(V2)')['resultsets']['Table1']"

    I had mistakenly assumed that SQL Server and stored procs would work out-of-the-box with Logic Apps.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.