How to Import CSV Data to SharePoint List with Power Automate Tutorial - ID Card Make

How to Import CSV Data to SharePoint List with Power Automate Tutorial - ID Card Make Hello everyone Reza here in this video I will show you how we can import data from a CSV file directly into a SharePoint list I will cover scenarios around various.

How to Import CSV Data to SharePoint List with Power Automate Tutorial

Types of columns and SharePoint and also cover scenarios where we could potentially run into challenges and how to handle those exceptions so let's check it out in action.

Foreign I have a CSV file data is stored in text format comma separated values I have data around my issue tracking.

System the information here includes the ID of the issue title description who the issue is assigned to status priority category and creation date.

So let's try and import this CSV file into a SharePoint list now one option we have in modern SharePoint is to directly create a list from a CSV file.

In my SharePoint site I'll click on new list and one of the new options here is from CSV.

I'll select this I can upload from my device I'll pick my file it launches the customize dialog wherein I can visualize my data.

It's smart enough to interpret that the first row in my CSV file were the headers and here I have the ability to check the column types and choose a new type if.

The current selection that it is making is incorrect so issue ID I would like to map this to a column of type number.

Title is text in SharePoint we have a column called title for every list description I will make this multi lines of text.

Assigned to these are email addresses of users in my Azure ad it does mapping this to a person or group column status I would like to map this to a.

Choice column priority I'll pick choice category I'll pick choice and then creation date we will map it to a date and time column.

Posts Related:

    You also have the option here to decide - ID Card Make

    If you do not want to import a specific call I'll click next I can give a name for my SharePoint list.

    I'll call it issue tracking and click create and just like that it will create a new SharePoint list set all those columns based on my CSV.

    File import customization that I mapped and include all the data the choice columns if I head over to column settings it does not include the choices.

    It has imported the data though so let's add the choices I have three options here open in progress and closed and for each of these I can add some.

    Formatting open blue in progress called closed green I'll click save.

    And you can see how the status column is representing that information I can do the same for priority click save the formatting is applied.

    Similar behavior for categories and these Choice columns that get generated if we go back to the settings of these columns.

    They are set as allow multi select to begin with in my case there can only be one status so I'll turn this off and click save.

    I'll do the same for priority but for category let's leave it allow multi-select for now the column for date and time if I do not.

    Need the time aspect I can remove it

    And this is a fully functional SharePoint list at this point if I click new I can add new rows to my issue tracking list.

    If I select an existing item I can view it if I want to modify this I can edit save and we can see that the edit has been reflected in my SharePoint list.

    This is a one-time import wherein it creates the list and imports the data but what if I have multiple CSV files that I receive on a periodic basis that I would like to import into that same.

    SharePoint list so for such scenarios let's leverage power automate so I'll launch make dot power automate.com.

    Go to create my automation job that I'm creating here I would like to trigger it manually so I'll pick instant Cloud flow pick the manual trigger.

    Give my flow a name and click create my flow trigger is a manually triggered flow and I would like the user to give me an.

    Input and that input would be of type file I'll make this a required field click on new step and here.

    I'll add a simple compose data operation action I will rename this to CSV data the input.

    I will go to expression and write the expression base 64 to string here for the parameter to the base64 tostring.

    Expression I will head over to Dynamic content and pick upload CSV so I will select this and I will click ok at this point let's save the flow.

    And let's test the flow manually I'll click test we can see how the flow is asking for a CSV file I'll click import I will select my CSV file.

    And click run flow click done the flow will trigger read that data from that CSV file you can see that information comes in base64.

    Format and that's the reason why I wrote that expression to convert it into text bear in mind the data here is stored in.

    The form of string that is comma separated in my CSV file the data ends in column H which is called creation date.

    Now if I look at the output of this compose action when I get to Creation date there is a new line character that's being rendered here and then it goes to.

    The next row and so and so forth I'll click edit flow now I need to split by a new line character.

    For that I will add a new step once again I'll use compose I will rename this to new line and here simply click enter.

    New step once again compose I'll rename this to array CSV the input.

    Will be the expression split to split I'll go to Dynamic content I would like to split CSV data.

    Comma split this with the new line character I'll click ok and that puts in the expression right here.

    Let's go ahead and test the flow tested with a previous trigger the flow gets triggered now if I look at array CSV you can see that the output is in add a.

    Format if I click show raw outputs each row in my CSV file will be available as a string in my array this is my header.

    And then these are all my data rows now there could be scenarios that it picks up empty rows so I would want to remove those Plus.

    If you have the header row like in my case I want to remove this row so I only have array of CSV data so I'll edit my flow array CSV I'll select this.

    My split expression right before that I will use the expression function skip skip my split expression comma.

    The first item in that array now close the function and click update Let's test this flow the flow has run successfully if I look at your raw outputs you can.

    See that the array does not include my header row and for me to remove any empty rows I'll edit the flow add a new step.

    Use the filter array data operation action the array of data here is the outputs of at acsv and here.

    My expression will be item which are the items within that array this is not equal to empty.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=b3aQf17ptAs
Previous Post Next Post