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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Convert an array to string in Power Automate (MS Flows)

(5) ShareShare
ReportReport
Posted on by 499

converting an array value to a string using Power Automate out of the box function.

 

"how to convert an array to string" in MS Flows.

 

Basically, we can use "split" function to convert an array into string but we may end up having extra column to the last value. To remove that we have to use another expression which checks for the string length and removes the last character [

substring(variables('varListOfRequestIDs'),0,sub(length(variables('varListOfRequestIDs')),1)) ].

 

To avoid the whole cumbersome process, we can leverage Power Automate's simple and out of the box function - join

 

Here is an to show how can we convert an array to string. for instance let's consider, we have an array [796759,933436,926050,1388108,762632,764554]. But as per the requirement, we need to convert it to string and send that value as 796759,933436,926050,1388108,762632,764554. 

varListOfRequestIDs = [796759,933436,926050,1388108,762632,764554]

varStringListOfRequestIDs : join(variables('varListOfRequestIDs'),',') gives us 796759,933436,926050,1388108,762632,764554

I have the same question (0)
  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Convert an array to string in Power Automate (MS Flows)

    hi @krishnags  Sorry if I missundersthand but you can use the expresion String('Yourvalue') to convert what ever you want to string.

  • SaiKrishnaGudluru Profile Picture
    499 on at
    Re: Convert an array to string in Power Automate (MS Flows)

    @ChristianAbata Yeah, I agree. But in the example I have given, I need to have an array to convert as string from [1,2,3,4,5] to 1,2,3,4,5 which altogether changes its data type and the value with out brackets. But when I tried with sting(variables('varArray')), it was giving me the value as string but with brackets. So, I thought of sharing this with you all and might help.

     

    feel free to add your thoughts to this.

     

    function: joinfunction: joinfunction : stringfunction : string

  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Convert an array to string in Power Automate (MS Flows)

    ok @krishnags  please do this to delete the last and the firts character from string.

     

    1.PNG2.PNG

     

    substring(outputs('Compose'),0,sub(length(outputs('Compose')),1))
    

     

    substring(outputs('First'),1,sub(length(outputs('First')),1))
    

     

  • SaiKrishnaGudluru Profile Picture
    499 on at
    Re: Convert an array to string in Power Automate (MS Flows)

    @ChristianAbata yeah, but if we go with JOIN, we can eliminate  substring(outputs('Compose'),0,sub(length(outputs('Compose')),1))  this finding length, getting substring and all. simply use JOIN and get the things done 🙂

  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Convert an array to string in Power Automate (MS Flows)

    shure @krishnags  so this solve your problem or not friend jejeje

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard