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 / Converting a CSV from ...
Power Automate
Suggested Answer

Converting a CSV from SharePoint to a SharePoint list

(1) ShareShare
ReportReport
Posted on by 441
Hello,
 
I'm looking for some assistance on a workflow I'm trying to build.
 
I want to have a scheduled flow to get the file content from a CSV file on sharepoint and import it into an existing sharepoint list.
 
The flow I have setup almost works, but I have run into some formatting issues which I just can't get my around. It seems that my csv file is choosing to format some of the rows date different to others, so when i try put this data into my sharepoint list date column, it causes an error.
 
Here is an example of the date causing the issue:
 
Date that works:
 
Note, 'ExpireDateText' is a column i created to see how the date column in the csv would display simply as text in the sharepoint list.
 
I have tried all sorts of methods to reformat to date, and even when i'm able to strip it back, is still won't accept that specific date.
AccountExpirationDate' is required to be of type 'String/date'. The runtime value '"31/12/2024"' to be converted doesn't have the expected format 'String/date'.
 
There is also another issue in that not all rows have a date, so when it gets to that row, the flow breaks again.
 
Then a final issue is that the flow seems to be trying to get one additional row from the CSV that has no data in it whatsoever, so again the flow is marked as failed.
 
Here is a screenshot of the flow, any recommendations or better solutions would be massively appreciated.
 
Categories:
I have the same question (0)
  • Suggested answer
    NsL Coder Profile Picture
    475 Moderator on at
    use trim() to remove extra space or newline from the file content first in the SplitByLine:
     
    trim(split(....))
     
    then in the apply to each where you Create Item, use either empty() expression or length() expression before you parse the date.
     
    if(empty(split(...)[x]), null, parseDateTime(...))
     
    as the the date time issue, you had another post on this already, copying the answer I post there:
     
    31/12/2024 is DD/MM/YYYY format and that's a UK Date format and if your sharepoint is using US date format MM/DD/YYYY, then there is of course going to be an error b/c there is no 31 month.
     
    You need to intake the "string" content from csv and parse it out as a date using the parseDateTime() expression.
     
    parseDateTime(the_csv_date_string, 'en-GB')
     
    if that doesn't work, then you need to specify the format too:
     
    parseDateTime(the_csv_date_string, 'en-GB', 'dd/MM/yyyy HH:mm')

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard