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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get file content has a...
Power Automate
Answered

Get file content has an error when I want to splitting csv file: "Unable to process template language expressions in action"

(0) ShareShare
ReportReport
Posted on by 10

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).

jsz930801_0-1657092159292.png

 

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?

Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @jsz930801 can you please share the expression that you have used in the Compose-split by new line action?

  • jsz930801 Profile Picture
    10 on at
    This is the expression of "Compose-split by new line action":
    split(outputs('Get_file_content')?['body'],outputs('Compose-new_line'))
     
    The "Compose-new line" contains an empty line to denote a new one.
  • Verified answer
    annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @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 Profile Picture
    10 on at

    Thank you so much!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard