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 / Split Function in Comp...
Power Automate
Suggested Answer

Split Function in Compose Returning a String

(1) ShareShare
ReportReport
Posted on by

I have the following function in a Compose step:

split(variables('ChunkOfText'), '/n')

 It doesn't matter what kind of delimiter I use, when I try to use the output into an array, I get an error message saying the output is invalid because it's a String. I'm probably missing a step-- any help?

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @orangeprince000 

    Please try to use this code [decodeUriComponent('%0A') means '\n']:

    split(variables('ChunkOfText'), decodeUriComponent('%0A'))
     
    split(string( variables('ChunkOfText')) , decodeUriComponent('%0A'))

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • orangeprince000 Profile Picture
    on at

    Unfortunately I'm still getting the same error.Screenshot 2024-06-21 131152.png

  • Muralidharan Profile Picture
    340 on at

    Please follow the below flow.

    muralidharan_0-1718993463085.png

     

    Expression used in Set variable: split( variables('ChunkOfText') , decodeUriComponent('%0A')) 

    The output: 

     

    muralidharan_1-1718993562342.png

     

  • JC-26071827-0 Profile Picture
    2 on at
    Just bumping this up
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
     
    Without running, could you show how you have initialized the array with value ?
     
     Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you! 

  • Suggested answer
    SB-26092301-0 Profile Picture
    2 on at
    I had the same issue, in my case there was an extra space before the the split expression in the compose action, so make sure there are no extra spaces before where you inserted the expression in the compose

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 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard