How to Import CSV to SharePoint List in Power Automate?

Do you know how to import CSV to SharePoint list in Power Automate? No, then don’t worry! Using Power Automate with a simple scenario, I will demonstrate how to convert a CSV file to a SharePoint list.

“CSV” in Power Automate usually refers to Comma-Separated Values, a plain text format used to represent tabular data. CSV files are often used for importing and exporting data between different applications or systems.

How to Import CSV to SharePoint List in Power Automate

Learn how to import CSV to a SharePoint List using Power Automate.

I have taken a SharePoint list named ‘Issue Tracker’ with a few columns and their data type.

ColumnsData Types
Issue IDNumber
Issue (renamed Title column)Single lines of text
Issue DescriptionMultiline of text
Issue StatusChoice
Issue Registered DateDate and Time
Issue Assigned ToPerson and Group
Issue Faced by DepartmentChoice(multi-select value)
Import CSV to SharePoint list using Power Automate

For this, I have created a CSV file with the same columns as the SharePoint list. Also, this CSV table has some data, as shown below.

Power Automate import CSV to SharePoint List

After importing the data from CSV to a SharePoint list using Power Automate, it will appear as shown below.

How to import CSV to SharePoint list using Power Automate

To achieve this, follow the steps below.

1. Open the Power Automate home page, click + Create -> Select the Instant cloud flow -> Enter the flow name, and choose the trigger’s flow (Manually trigger the flow).

  • Add an input as ‘File content‘ to this trigger, as shown below.
Convert CSV to SharePoint list in Power Automate

2. Insert the ‘Compose‘ flow action (renamed as CSV Data) and insert the expression used to decode the data encoded in Base64 format.

base64ToString(triggerBody()['file']['contentBytes'])

This expression in Power Automate converts a Base64-encoded string to its equivalent plain text (string) representation.

How to convert CSV to SharePoint list in Power Automate

3. Then add the ‘Compose’ flow action, hit enter into inputs, and leave.

Import CSV to SharePoint List in Power Automate

4. Add another ‘Compose’ flow action to provide expression, as shown below.

skip(split(outputs('CSV_Data'),outputs('Compose')),1)

where this expression skip(split(outputs(‘CSV_Data’), outputs(‘Compose’)), 1) in Power Automate is used to split a CSV (Comma-Separated Values) string into an array of values and then skip the first element in that array.

How to import CSV to SharePoint List in Power Automate

5. Next, add the ‘Filter array’ flow action to selectively include or exclude elements from an array based on specified conditions and set the required fields.

  • From: Here, I have given the Outputs of the Array(Compose) flow action.
item() is not equal to ' ' 
Power Automate convert CSV file to SharePoint List

6. Now, add the ‘Apply to each‘ flow action used to iterate over a collection of items and perform a set of actions for each item.

  • Here, I have Selected output from the previous steps as ‘Body’ of the Filter array flow action.

7. Then add the ‘Select’ flow action to choose and manipulate data to suit their specific needs selectively and set the required fields.

  • From: Here, I have given the expression as listed below.
split(split(item(),',')?[7],';')

where it splits a string first by commas and then by semicolons of the 6th column, extracting specific values from the resulting array.

  • Map: I have selected item() from the Expression as shown below.
Convert CSV file to SharePoint List in Power Automate

8. Now, add the ‘Create item‘ flow action to add a new item or record in the SharePoint list and set all the details as shown below.

  • Site Address: Provide the SharePoint site address.
  • List Name: Select the name of the SharePoint list.
Columns ValueDescription
Titlesplit(item(),’,’)?[0]To split a string by commas and semicolons, extracting specific values from the resulting array.
[3] = indicates column index
Issuesplit(item(),’,’)?[1]To split a string by commas and semicolons, extracting specific values from the resulting array.
[0] = indicates column index
Issue Descriptionsplit(item(),’,’)?[2]To split a string by commas and semicolons, extracting specific values from the resulting array.
[1] = indicates column index
Issue Status Valuesplit(item(),’,’)?[3]To split a string first by commas and then by semicolons, extracting specific values from the resulting array.
[3] = indicates column index
Issue Registered Datesplit(item(),’,’)?[4]To split a string by commas and semicolons, extracting specific values from the resulting array.
[3] = indicates column index
Issue Assigned Tosplit(item(),’,’)?[5]To split a string by commas and semicolons, extracting specific values from the resulting array.
[4] = indicates column index
  • Issue Faced by Department: Here, I have selected the outputs of the Selected flow action from dynamic content.
Power Automate import CSV file to SharePoint list

9. Now, it’s time to Save and Test. Then test it Manually -> Now, inside the Run flow tab, import the CSV file from your local device that you have created -> Click on Run flow.

How to convert CSV to SharePoint List using Power Automate

10. Open the SharePoint list and refresh it once. The screenshot below shows that all the CSV data has been converted to the SharePoint list items.

How Power Automate import CSV file to SharePoint List

This is how to import CSV to SharePoint List using Power Automate.

Conclusion

I hope this Power Automate tutorial taught you the step-by-step procedure to import CSV to SharePoint List using Power Automate.

Moreover, you may like some more Power Automate tutorials: