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 / Create CSV file from a...
Power Automate
Unanswered

Create CSV file from apply to each

(0) ShareShare
ReportReport
Posted on by 240

Hi Folks,

 

I have a flow in which I am parsing json, in that JSON I need name and values from 2 different forms, and want to create a common csv file from them. I am not able to append one csv . Please help

 

PowerUser0_0-1644394472943.png

This is the entire structure of flow what I am trying right now, 

PowerUser0_1-1644394593835.png

This is the output of one form, as you can see I need name and values which is inside field_data array, similary I have one more form, now please help anyone, like how I can create two rows which will have all the name and values of both the form

@Expiscornovus @jinivthakkar @Mister_Shaik @ekarim2020 @gabibalaban @RezaDorrani 

Categories:
  • PowerUser0 Profile Picture
    240 on at

    Any help is appreciatedn @tom_riha @abm  

  • Mister_Shaik Profile Picture
    1,008 on at

    Hi @PowerUser0 ,

     

    There are a few things that are not quite clear, but I'm giving you a solution based on my assumptions, please do let me know if it's wrong.

     

    You have a loop, where you're getting the data and parsing it. Now the output of that parsed data is to be converted into a csv for your consumption in other actions. In this case, you can do the following,

    1. Create a array variable to store the joined array data
      1. variable.PNG
    2. After the parse json, use a compose to join both the Variable data and field_data's data
      2. collect.PNG

    3. Now after all those actions, outside the main ApplyToEach loop, create your csv using the data in the array variable
      3. create csv.PNG

     

    This way, you are having a single array variable collecting all the data across the different loops and at the end, you can use that array to create your csv.

     

    Hope my assumptions are not wrong and this helps you 🙂

     

    Kind Regards,

    Shaik Sha
    ________________________________________________________________________

    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • PowerUser0 Profile Picture
    240 on at

    Hi @Mister_Shaik Thanks for your reply I really appriciate that, I am pasting the real output which I am getting from parse json,

    {
    "data": [
    {
    "created_time": "2022-02-13T16:39:36+0000",
    "id": "151606954886765",
    "field_data": [
    {
    "name": "languages",
    "values": [
    "english"
    ]
    },
    {
    "name": "first_name",
    "values": [
    "Roopa"
    ]
    },
    {
    "name": "last_name",
    "values": [
    "Shree"
    ]
    },
    {
    "name": "email",
    "values": [
    "roobash@gmail.com"
    ]
    },
    {
    "name": "company_name",
    "values": [
    "L"
    ]
    },
    {
    "name": "date_of_birth",
    "values": [
    "1/04/1999"
    ]
    },
    {
    "name": "gender",
    "values": [
    "female"
    ]
    }
    ]
    },
    {
    "created_time": "2022-02-11T18:32:25+0000",
    "id": "5506756899180",
    "field_data": [
    {
    "name": "languages",
    "values": [
    "hindi"
    ]
    },
    {
    "name": "first_name",
    "values": [
    "Rahul"
    ]
    },
    {
    "name": "last_name",
    "values": [
    "Bajpai"
    ]
    },
    {
    "name": "email",
    "values": [
    "bajpai@gmail.com"
    ]
    },
    {
    "name": "company_name",
    "values": [
    "Tech"
    ]
    },
    {
    "name": "date_of_birth",
    "values": [
    "0/17/1997"
    ]
    },
    {
    "name": "gender",
    "values": [
    "male"
    ]
    }
    ]
    }
    ],
    "paging": {
    "cursors": {
    "before": "QVFIUm5TTXdZARkxuSkhlQVlluRUtrWGRObE9MenRnN2JoSzRzS0VJb00tMTA0QWxZAQ0xOM21jQnFDZA1lQbXNPbU13",
    "after": "QVFIUjJNMVhvS2xGbFA5N1ZA3NWNmVzFjMGJqaWswOW9ZAY0hvMkxmQzdRT29IVXA2RW1YYlFsV19DYmFfaEZAvQThxSTln"
    }
    }
    }

     

    Now, I need to create a CSV file with Name as the headers of CSV file and values should be the values for those header , so as you can see I have two id's that means these are two should be two entries in CSV file

    I hope this will give more idea,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 202

#3
David_MA Profile Picture

David_MA 180 Super User 2026 Season 2

Last 30 days Overall leaderboard