Hi!
I would like to create a flow which is waiting for a file created in a Sharepoint folder ("When a file is created in a folder" trigger).
I always copy .csv files into this folder which have to be processed. The trigger is followed by "Get file content" (File identifier is "x-ms-file-id") which is maybe the source of the problem, because the "Compose-split by new line" action recognizes type Object from the output of "Get file content" despite the csv file contains comma separeted values (there's no null value).
By the way I created this flow by this tutorial: https://www.c-sharpcorner.com/article/parse-csv-file-using-power-automate/
In this solution the path of the exact file is defined manually so it's not right for me because the flow should process the csv file automatically (when I copy it into the trigger's folder).
Could someone help me in this flow?
Thank you so much!
@jsz930801 you are using SharePoint Get File Content action which returns the data in Base64 encoding not the text data. So you need to following expression to convert it to a string, use following expression in the compose action which is failing for you:
split(base64ToString(outputs('Get_file_content')?['body']?['$content']), decodeUriComponent('%0D%0A'))
thanks to @Paulie78 , i got understanding from his video about parsing CSV file https://www.youtube.com/watch?v=sXdeg_6Lr3o
@jsz930801 can you please share the expression that you have used in the Compose-split by new line action?
Michael E. Gernaey
18
Super User 2025 Season 1
stampcoin
16
Churchy
12