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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Automate flow cr...
Power Apps
Unanswered

Power Automate flow creation: load data from csv file to a Dataverse table

(1) ShareShare
ReportReport
Posted on by

Hello All,
sorry if I waste your time with such a basic question, but I was unable to finish the answer...

I want to create a flow to upload data to a Dataverse table from a csv file.
I get the file content, I split to lines, I create an Apply to each loop and add a Compose split like split (items('Apply_to_each_column'), ',') and add an "Add a new row to selected environment". 

Question is that that at the advanced parameters of "Add a new row to selected environment" contains column names of the Dataverse table. How should I set there to add the appropriate value from the split line there?

Thank you!

I have the same question (0)
  • ivan_apps Profile Picture
    2,187 Moderator on at
    Re: Power Automate flow creation: load data from csv file to a Dataverse table

    When you split the string by the comma delimiter, you end up with an array of data.

    Assuming your column order will stay static, you simply can do split(…)[0] to reference the first item, split(…)[1] to reference the second column, etc, etc.

     

    what i would recommend is that you split your row once using a compose statement and reference that output when you do the array lookup using [0], [1]… it will make your processing time faster.

  • lepkefing Profile Picture
    on at
    Re: Power Automate flow creation: load data from csv file to a Dataverse table

    I add lineSplitted[0] as the parameter for a column, and column is being filled with this: lineSplitted[0] instead of adding the data referred as first value from lineSplitted.

    I initialize an array variable then I add an Apply to each for that output;
    then I split lines inside the loop like: 

    split(items('Apply_to_each_column'), ',')
    then I Set the initialized variable;
    then I use Add a new row...
    How can I exactly refer instead of adding simply lineSplitted[0]?
    Or where else can I have a mistake?
    Thank you!

  • Verified answer
    ivan_apps Profile Picture
    2,187 Moderator on at
    Re: Power Automate flow creation: load data from csv file to a Dataverse table

    create array variable “varArray”

    iterate through your CSV file rows, repeat the below for each row.
    1. split your row and save it in a ‘compose’ action.

     

    2. create another compose statement, create a JSON object like so:

    {
    “Col1”: (compose_output)[0],
    ”Col2: (compose_output)[1],

    etc, etc

    }

     

    3. Append to varArray your JSON object.

     

    exit iteration

    you can verify your array contains your data now, it should match up to your CSV.

     

    you can now iterate varArray and for each item in the array, parseJSON action with the schema you created in the JSON object (you can paste a sample execution so it generates the schema from example).

     

    for each item, create the new Dataverse record by referencing your parseJSON action. Each column should be available by name, so Col1, Col2, etc. should be things you can select and format as you wish.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard