web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help converting JSON T...
Power Automate
Unanswered

Help converting JSON TO CSV

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, I am trying to automate the daily process of running a query and saving it to an excel file. I am having trouble converting JSON to CSV. I am fairly new to power automate. I am able to create a csv file, but the data is still in JSON Format Here is my process:

 

 

 

Web capture_20-1-2023_10489_make.powerautomate.com.jpegWeb capture_20-1-2023_104321_make.powerautomate.com.jpegWeb capture_20-1-2023_104654_make.powerautomate.com.jpegWeb capture_20-1-2023_104747_make.powerautomate.com.jpeg

Thank you in advance, I have been stuck on it for days now!

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,499 on at

    Hey @Anonymous 

     

    Try one of the following steps, and it would help:

     

    1) Dont use initialize variable and append to array variable, directly pass the body of parse json inside the create csv table action.

    2) If the above does not give the appropriate answer, pass body('Parse_JSON').ResultSets in the csv table action.

    3) In the parse json action, pass the ResultSets. Copy the current expression you are passing in parse json, remove it. Paste the expression and write .ResultSets after that. 

    4) If none of the above method works, send me the test data you are getting from that sql query, I will try it on my end and send you the screenshot of the flow. 

     

    For example the test data should look like:

     

    {

    "ResultSets":{

    "Table1":[

    "AccountName":"ABC","first name":"DEF",.....

     

    Like this if you can send the test data, I will do it for you. 

    Probably you used array because initialize variable and append to array because create csv might be giving you error.

    There is no need to use append to array, you can directly pass the body of parse json while initializing the array. 

    Append to array is used to append a single element at the end of the array or if you are using a loop add elements one by one at the end. 

     

    I hope all this will help 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard