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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert CSV file to JSON
Power Automate
Answered

Convert CSV file to JSON

(0) ShareShare
ReportReport
Posted on by 58
Hi, I have created a flow which converts a CSV file into JSON. however the JSON file is not in the correct format required. 
 
 
It is creating the .JSON file in this format 
 
 
 
It should look something like this
 
 
Any ideas around this?
 
Thanks
Karen
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    Can you show the actions you are using to convert the CSV to JSON?  There are third party actions that can do this, but nothing built in that will do it directly.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Verified answer
    karenlacey Profile Picture
    58 on at
    Hi Paul, I just found this solution and built it within Power Automate and the output is what I am after. How To Parse any CSV to JSON Array - DamoBird365
     
    The output is this which I can use. 
     
    [
    {
    "lineItemID": "Line1",
    "previousLineItemID": "NULL",
    "employeeID/employeePpsn": "1234567X",
    "employeeID/employmentID": "1",
    "employerReference": "RefLinkX",
    "name/firstName": "Alpha",
    "name/familyName": "Bloggs",
    "address/addressLines/0/addressLine": "LaneX",
    "address/addressLines/1/addressLine": "NULL",
    "address/addressLines/2/addressLine": "NULL",
    "address/county": "Dublin",
    "address/eircode": "A12B3C4",
    "address/countryCode": "IRL",
    "dateOfBirth": "01/01/1960",
    "category": "SMALL_BENEFITS_EXEMPTION",
    "subCategory": "NULL",
    "numberOfDays": "NULL",
    "paymentDate": "01/01/2024",
    "amount": "100.789"
    },
    {
    "lineItemID": "Line2",
    "previousLineItemID": "NULL",
    "employeeID/employeePpsn": "1234567Y",
    "employeeID/employmentID": "1",
    "employerReference": "RefLinkY",
    "name/firstName": "Bravo",
    "name/familyName": "Bloggs",
    "address/addressLines/0/addressLine": "LaneY",
    "address/addressLines/1/addressLine": "StreetY",
    "address/addressLines/2/addressLine": "NULL",
    "address/county": "Galway",
    "address/eircode": "A12B3C4",
    "address/countryCode": "IRL",
    "dateOfBirth": "01/01/1960",
    "category": "TRAVEL_AND_SUBSISTENCE",
    "subCategory": "TRAVEL_VOUCHED",
    "numberOfDays": "NULL",
    "paymentDate": "01/01/2024",
    "amount": "100"
    },
    {
    "lineItemID": "Line3",
    "previousLineItemID": "NULL",
    "employeeID/employeePpsn": "1234567Z",
    "employeeID/employmentID": "1",
    "employerReference": "RefLinkZ",
    "name/firstName": "Charlie",
    "name/familyName": "Bloggs",
    "address/addressLines/0/addressLine": "LaneZ",
    "address/addressLines/1/addressLine": "StreetZ",
    "address/addressLines/2/addressLine": "TownZ",
    "address/county": "Cork",
    "address/eircode": "A12B3C4",
    "address/countryCode": "IRL",
    "dateOfBirth": "01/01/1960",
    "category": "REMOTE_WORKING_DAILY_ALLOWANCE",
    "subCategory": "NULL",
    "numberOfDays": "30",
    "paymentDate": "01/01/2024",
    "amount": "100"
    },
    {
    "lineItemID": "",
    "previousLineItemID": null,
    "employeeID/employeePpsn": null,
    "employeeID/employmentID": null,
    "employerReference": null,
    "name/firstName": null,
    "name/familyName": null,
    "address/addressLines/0/addressLine": null,
    "address/addressLines/1/addressLine": null,
    "address/addressLines/2/addressLine": null,
    "address/county": null,
    "address/eircode": null,
    "address/countryCode": null,
    "dateOfBirth": null,
    "category": null,
    "subCategory": null,
    "numberOfDays": null,
    "paymentDate": null,
    "amount": null
    }
    ]

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard