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 / Need help with compose...
Power Automate
Answered

Need help with compose to split csv file by lines

(0) ShareShare
ReportReport
Posted on by 576

I have a flow where I am trying to parse a csv file. After I get the file content, I have a compose to split the content by lines. I keep getting the following error: InvalidTemplate. Unable to process template language expressions in action 'SplitByLines' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#split for usage details.'.

 

My expression is:

split(outputs('Get_file_content')?['body'], decodeUriComponent('%0D%0A'))
Categories:
I have the same question (0)
  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @ahhollan ,

    You need to convert the output of get file content before you can use the split function.

    Could you please show me a screenshot of the contents of your csv file? Private information can be coded.

    Also I think this link can help you:

    Solved: Split method - parse csv - Power Platform Community (microsoft.com)

    Best Regards,

    Sunshine Gu

  • ahhollan Profile Picture
    576 on at

    Your post helped and I was able to convert to string. However, I'm getting the unwanted character below. What do i do?

    ahhollan_0-1715345147366.png

     

  • ahhollan Profile Picture
    576 on at

    With the help of a coworker, we figured it out. It's called a utf=8 bom and I added a compose to strip that out. The flow is running fine now. Your suggestion to convert the get file content was what I needed.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard