Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Convert csv file to JSON format

(0) ShareShare
ReportReport
Posted on by 221

Is there a way to convert csv files to JSON format?

I have tried searching for same question but no luck.

Please advise.

  • noorG Profile Picture
    17 on at
    Re: Convert csv file to JSON format

    thanks a lot!

  • Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: Convert csv file to JSON format

    In case you are interested, I have just produced a video using your example for how this flow was built:

    https://youtu.be/0RqSco9Til0

     

  • Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: Convert csv file to JSON format

    Although you have already accepted the solution, here is an even more basic version which does the same thing:

    https://ibb.co/wgkrWtr

    CSVtoJSON-Simple.jpg

    Download it here:

    https://www.tachytelic.net/wp-content/uploads/CSVtoJSON-Simple_20210121200115.zip

  • JeffGimo Profile Picture
    221 on at
    Re: Convert csv file to JSON format

    Thank you so much @Paulie78 tried and tested it and it is working as I need it. You the best!!

  • Verified answer
    Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: Convert csv file to JSON format

    The flow below produces the following output:

     

    [
     {
     "SSID": "test1",
     "sessionCount": "90 (54.22%)",
     "clientCount": "26 (48.15%)",
     "duration": "1d:11h:35m (62.06%)",
     "totalUsage": "939.09MB (50.69%)",
     "usage": "814.94MB/124.15MB"
     },
     {
     "SSID": "-",
     "sessionCount": "36 (21.69%)",
     "clientCount": "13 (24.07%)",
     "duration": "0d:2h:55m (5.09%)",
     "totalUsage": "0.00B (0.0%)",
     "usage": "0.00B/0.00B"
     },
     {
     "SSID": "test2",
     "sessionCount": "21 (12.65%)",
     "clientCount": "13 (24.07%)",
     "duration": "0d:8h:35m (14.97%)",
     "totalUsage": "538.12MB (29.05%)",
     "usage": "500.54MB/37.58MB"
     },
     {
     "SSID": "test3",
     "sessionCount": "14 (8.43%)",
     "clientCount": "8 (14.81%)",
     "duration": "0d:8h:0m (13.95%)",
     "totalUsage": "25.28MB (1.36%)",
     "usage": "20.60MB/4.68MB"
     },
     {
     "SSID": "test4",
     "sessionCount": "3 (1.81%)",
     "clientCount": "2 (3.7%)",
     "duration": "0d:0h:20m (0.58%)",
     "totalUsage": "55.76KB (0.0%)",
     "usage": "26.93KB/28.84KB"
     },
     {
     "SSID": "test5",
     "sessionCount": "2 (1.2%)",
     "clientCount": "1 (1.85%)",
     "duration": "0d:1h:55m (3.34%)",
     "totalUsage": "350.14MB (18.9%)",
     "usage": "338.73MB/11.41MB"
     }
    ]

     

    Here is the flow (you can also view it here, https://ibb.co/DDG5z7F )

    CSVtoJSON.jpg

    Because this flow may be difficult for you to copy, I have exported it so you can import it into your environment:

    https://www.tachytelic.net/wp-content/uploads/CSVtoJSON_20210121194739.zip

    No need to remove the first two lines, the flow handles it just the way it is.

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Convert csv file to JSON format

    Hi @JeffGimo 

     

    You still need to truncate the first line of your CSV file and save it. It may or not possible. Then use the  post I provided earlier should work for you. 

  • JeffGimo Profile Picture
    221 on at
    Re: Convert csv file to JSON format

    Thanks for the tip. Is there a way to convert this csv file to json format?

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Convert csv file to JSON format

    Hi @JeffGimo 

     

    Generally it a good practice to have one header for a csv file. It will be easier to manage. Otherwise you will struggle with selecting the rows and define the fields.

  • JeffGimo Profile Picture
    221 on at
    Re: Convert csv file to JSON format

    Thank you so much.
    here it is

    Session Data by SSID,,,,,
    SSID,Session Count (%),Client Count (%),Duration (%),Total Usage (%),Usage (In/Out)
    test1,90 (54.22%),26 (48.15%),1d:11h:35m (62.06%),939.09MB (50.69%),814.94MB/124.15MB
    -,36 (21.69%),13 (24.07%),0d:2h:55m (5.09%),0.00B (0.0%),0.00B/0.00B
    test2,21 (12.65%),13 (24.07%),0d:8h:35m (14.97%),538.12MB (29.05%),500.54MB/37.58MB
    test3,14 (8.43%),8 (14.81%),0d:8h:0m (13.95%),25.28MB (1.36%),20.60MB/4.68MB
    test4,3 (1.81%),2 (3.7%),0d:0h:20m (0.58%),55.76KB (0.0%),26.93KB/28.84KB
    test5,2 (1.2%),1 (1.85%),0d:1h:55m (3.34%),350.14MB (18.9%),338.73MB/11.41MB

    . Thanks for the instruction. 

  • Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: Convert csv file to JSON format

    Just open the CSV on your machine, copy and paste a few lines, ideally into the code window:

    2021-01-21_17-48-16.gif

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >