question

SPK545-5672 avatar image
0 Votes"
SPK545-5672 asked SPK545-5672 commented

Convert JSON output into CSV table in logic apps

hello,
I'm trying to execute the below use case by using logic apps
1) I'd like to design logic app flow where it connects with Azure resource graph explorer and provide me the list of virtual machines details in CSV format
2) As part of that, I'm testing the CSV table flow where I see the error as shown below

My flow:
48735-image.png

please let me know how what I need to use to convert JSON out into a CSV table, later I need to move this into the database

azure-logic-apps
image.png (24.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @SPK545-5672, I see that the type of the variable is an "Object". As the values in the response is object you may try :

1) Parse the JSON response.
2) Create an Empty array variable.
3) Append the Parse JSON body into this array variable and then pass that value to the next action. Something similar to :

49848-image.png



Let me know if this helps!

1 Vote 1 ·
image.png (67.1 KiB)

thank you @JayaC-MSFT , i did the above process, and i see the CSV file uploading into my blob container, the one

primary issue I'm seeing that data is not parsing correctly (attached the o/p CSV screenshot ), all the output data

coming as combined data in a
a
a single cell that's hard to read,

here is my flow

50037-image.png

50074-image.png

50075-image.png


I'm looking for something we can read as Key-value pairs such as below

50131-image.png


I'm sure that I'm missing something in the JSON parsing part, but not sure what should be changed


0 Votes 0 ·
image.png (16.3 KiB)

0 Answers