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 / Sharepoint List string...
Power Automate
Answered

Sharepoint List string to Power Automate array

(0) ShareShare
ReportReport
Posted on by 73

Hi

 

I have a list of strings stored in a sharepoint list and I am trying to pass these into Power Automate using Get Items and then store as an array. This array will then be used to build a series of subfolders so it is quite long.

 

The original string of text held in each row of the SharePoint list follows this format (with varying text depending on the row item:

 

"01 Proposal","01 Proposal/01 Original Proposal",

 

However when I look at the raw inputs, the format looks like this, with "\ added leading each section of the string and \ added at the end:

 

"\"01 Proposal\",\"01 Proposal/01 Original Proposal\",
 
I am then using Split on the comma to enable me to convert to an array but the characters that are being added are making the filepaths that I need to create invalid. Any ideas what I'm doing wrong?
 
Thanks
Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @WalesMariner ,

     

    Could you please show me your flow?

    What is the column's datatype? Is it a single line of text column?

     

    Best Regards,

    Bof

  • WalesMariner Profile Picture
    73 on at

    Hi the list column setting is  - Multiple lines of text.

     

    For the flow I tried using a compose step with a replace expression before splitting on the comma to remove the unwanted elements but that did nothing,  I then tried the same compose after using the split expression on the comma, but in that sequence I got this error:

     

    Unable to process template language expressions in action 'Compose_SubFolder_Replace' inputs at line '0' and column '0': 'The template language function 'replace' expects its first parameter 'string' to be a string. The provided value is of type 'Array'. 

     

    This is the section of the flow that I'm got the issue with:

     

    WalesMariner_0-1662969322635.png

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @WalesMariner ,

     

    I've made a test and it worked well. Is that what you want?

    vbofengmsft_0-1662970863254.jpeg

    vbofengmsft_1-1662970871288.png

    Result

    vbofengmsft_2-1662970882786.png

    vbofengmsft_3-1662970891464.png

     

    Best Regards,

    Bof

     

     

     

  • WalesMariner Profile Picture
    73 on at

    Yes that's what I need how am I getting the extra characters in the raw input from the SharePoint list?

     

    thanks

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @WalesMariner ,

     

    What I get is that the value shown in the SP list has no extra characters. Can you provide some screenshots of the data source and run history screenshots of the flow.

     

    Best Regards,

    Bof

     

  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    It is quite normal for the slashes that you see to be present. The reason is because your string contains double quotes and these need to be escaped. I am assuming that you do not want the double quotes in your folder name so I would suggest you do something like this:

    SplitFilePath.png

    I used the expression:

    split(replace(outputs('Compose'), '"', ''), ',')

    Before the split on the comma, the double quotes are being removed entirely, which produces clean output like this:

    [
     "01 Proposal",
     "01 Proposal/01 Original Proposal"
    ]

     

    Hope this helps

     

    Blog: tachytelic.net

    YouTube: https://www.youtube.com/c/PaulieM/videos

    If I answered your question, please accept it as a solution 😘

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 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 370

Last 30 days Overall leaderboard